SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict skunkbad's Avatar
    Join Date
    Apr 2008
    Location
    Temecula, CA
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery Address Plugin using .live()

    I'm working on converting all the scripts on a site I am working on to use jquery 1.8.2. We've been using the jquery address plugin:

    https://github.com/asual/jquery-addr...ery.address.js

    It is using $.live() twice on line 670, and I'm wondering if the proper conversion is like this:

    Code:
    // Old
    $(sel ? sel : this).live('click', f).live('submit', function(e) {
    
    //New
    $(document).on('click', (sel ? sel : this), f).on('submit', (sel ? sel : this), function(e) {

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    9,081
    Mentioned
    153 Post(s)
    Tagged
    2 Thread(s)
    Looks fine to me. Is it not working?
    Rémon - Hosting Advisor

    SitePoint forums will switch to Discourse soon! Make sure you're ready for it!

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Addict skunkbad's Avatar
    Join Date
    Apr 2008
    Location
    Temecula, CA
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't tested it yet. I'm still going through all of the js files and replacing all of the instances of .live() with .on(). I'll test soon and let you know if there are any problems. Thanks for your reply.

  4. #4
    SitePoint Addict skunkbad's Avatar
    Join Date
    Apr 2008
    Location
    Temecula, CA
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seems like things are working good. Thanks.


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
  •