by default it does not close when I click off the overlay...adding the param doesn't make it work either.
closeOnClick doesn"t work Created Nov 13, 2009
This thread is solved
Views: 3014 Replies: 12 Last reply Jan 17, 2011
You must login first before you can use this feature
Reply to:
closeOnClick doesn"t work, from
chovy
You are not very forthcoming with details ;-), but it could be related to this bug I just filed.
Reply to:
» closeOnClick doesn"t work, from
blacktrash
Reply to:
Here"s the URL, from
chovy
It works for me when I click on the grey area around the centered white area (Firefox, Safari, Opera, IE6). But, as I said in my bug report, this worked far better in version 1.1.1 of jquery.tools.
Reply to:
» Here"s the URL, from
blacktrash
I agree this should be considered a bug. I ran in to the same problem and came across this threat. I added a click handler to document that closes all overlays. Then I added a click handler to every overlay to stop event propagation, so the overlays are not closed when one clicks inside them. I hope this helps...
$(document).ready(function() {
$("img[rel]").overlay({
top:'40%',
onStart: function(event) {
event.stopImmediatePropagation();
}
});
$('.overlay').click(function(event) {
event.stopImmediatePropagation();
});
});
$(document).click(function() {
$("img[rel]").each(function() {
$(this).overlay().close();
});
});
$(document).ready(function() {
$("img[rel]").overlay({
top:'40%',
onStart: function(event) {
event.stopImmediatePropagation();
}
});
$('.overlay').click(function(event) {
event.stopImmediatePropagation();
});
});
$(document).click(function() {
$("img[rel]").each(function() {
$(this).overlay().close();
});
});
Reply to:
» Here"s the URL, from
blacktrash
Its not working at all for me on mac 10.5.8 and FF 3.5.5 or Safari. It just stays open.
I'm giving wernerglinka's fix a try. I'd rather not down grade jquery-tools just to get this feature to work.
I'm giving wernerglinka's fix a try. I'd rather not down grade jquery-tools just to get this feature to work.
Reply to:
» » Here"s the URL, from
chovy
Chovy,
I believe you have to click outside the body element to close the overlay. That is the reason why I added the click on thedocument handler which includes the entire window area. Let me know how it works for you.
btw,
I am developing on mac 10.5.8 but have tested this in virtual machines running window xp with ie7, ie8 and ff3.5. I also tested it on mac safari 3, 4 and ff 3.5/4
I believe you have to click outside the body element to close the overlay. That is the reason why I added the click on thedocument handler which includes the entire window area. Let me know how it works for you.
btw,
I am developing on mac 10.5.8 but have tested this in virtual machines running window xp with ie7, ie8 and ff3.5. I also tested it on mac safari 3, 4 and ff 3.5/4
Reply to:
» » » Here, from
wernerglinka
That explains it...I am using a new method where "body" element is what usually is done with a top-level "div".
I am seeing it work now that I click in the dark gray border area.
I am seeing it work now that I click in the dark gray border area.
Reply to:
» » » » Here, from
chovy
You fix worked like a charm. Thanks
Reply to:
» » » » » Here, from
chovy
Alright,
It's fixed then. Let's hope the Tool guys will fix this in a later version.
I love this library. Has saved me a lot of time...
Werner
It's fixed then. Let's hope the Tool guys will fix this in a later version.
I love this library. Has saved me a lot of time...
Werner
Reply to:
» » » » » » Here, from
wernerglinka
Yes, it has been nice not having to recreate the wheel everytime.
Reply to:
» » » » » » » Here, from
chovy
I have the same problem. and searched the entire forum and tried each solution they made with no luck.
wernerlinka i tried your work around. It still didn't work. the popup goes up and them disappears quickly without any click.
anyone else have any ideas?
wernerlinka i tried your work around. It still didn't work. the popup goes up and them disappears quickly without any click.
anyone else have any ideas?
Reply to:
» » » » » » » » Here, from
kahhoewan
Kahhoewan,
the "onStart" event in wernerlinka workaround never fires. you may replace it with onBeforeLoad and it works fine :
Marc
the "onStart" event in wernerlinka workaround never fires. you may replace it with onBeforeLoad and it works fine :
$("img[rel]").overlay(
{
onBeforeLoad: function(event) {
event.stopImmediatePropagation();
}}
);
hope it helpsMarc
