http://docs.jquery.com/Events/live
Please see my response to the recent "jquery uploadify question" msg.
On Thu, Nov 26, 2009 at 12:09 PM, Keysher <keysher@gmail.com> wrote:
> 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( function() {
> return false;
> });
> $(".noClick").click( function() {
> $(this).addClass("disabled");
> });
> });
>
> The HTML:
> <a href="#" class="noClick">Click!</a>
>
> (This is an example, I know that isn't logic)
>
No comments:
Post a Comment