[jQuery] Re: Click event outside of an element

2009-12-03 Thread Keysher
Umm, It seems fine, I'll check it later. Thanks! On 23 nov, 15:13, Dustan dustan.kas...@gmail.com wrote: Perhaps something along these lines is what you are looking for? $(document).click(function(event) {     if (!$(event.target).hasClass('classname')) {         // run this code if

[jQuery] disable links in a class set dynamically

2009-11-26 Thread Keysher
Hi! I have a problem. I want to disable links in a specified class. Like this: $(.disabled).click( function() { return false; }); It works fine if the class exists before, but if I add the class to an element, not works!! $(document).ready(function() { $(.disabled).click(

[jQuery] Re: Click event outside of an element

2009-11-22 Thread Keysher
with the action you want. Then you bind the classname to stop it from propagate up to the document root. On Nov 20, 2:29 pm, Keysher keys...@gmail.com wrote: Hi! I am newbie in JQuery. I want to catch click event outside and specified class. For example, I have a div with class classname

[jQuery] Click event outside of an element

2009-11-20 Thread Keysher
Hi! I am newbie in JQuery. I want to catch click event outside and specified class. For example, I have a div with class classname, and I want to attach some actions when I click outside, in the rest of the page. I tried with this (to get the classname where I click): $('*').click(function(){