SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: jquery on()

Hybrid View

  1. #1
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    jquery on()

    Hello all!

    I have a problem with jquery, I have this function

    Code:
    $(document).ready( function() {
        var button = $('#edit_race');
        button.on('click', function() {
            alert('works');
        });
    });
    If I run it here

    http://jsfiddle.net/S38rF/

    It works but when I run it on my machine it doesn't, it gives me an error: button.on is not a function, Jquery is loaded as I am using it also for other things in the page and everything else works fine except this, I am running this in Joomla could it be a problem with Mootools interfering?
    Do you get bothered because I do the same thing every day?
    Do you question why I do it?
    Then find something that you actually like doing!!!

    Stop thinking on what I do.

  2. #2
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I was using the wrong version of jQuery!
    Do you get bothered because I do the same thing every day?
    Do you question why I do it?
    Then find something that you actually like doing!!!

    Stop thinking on what I do.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •