Giter Site home page Giter Site logo

Comments (2)

neerajsingh0101 avatar neerajsingh0101 commented on June 18, 2024

Could you please elaborate on what the issue is here?

from jquery-ujs.

jwoertink avatar jwoertink commented on June 18, 2024

oh yeah, sure. Basically what happened was using the latest rails.js, jquery 1.4.4, and Rails 3.0.3 I created the normal delete link to delete an object <%= link_to('delete', post_path(post), :method => :delete, :confirm => 'Are you sure?') %> and when clicking this, it would never show the "Are you sure?", instead it would just delete. To fix this I changed flipped the arguments on the $('body').delegate() function to put the event first, and the selectors second. This worked fine, but I thought it was weird that the docs on the jQuery API said the selector comes first. I read through all of the comments on that site and found that older versions of the jQuery Validate plugin were overriding the delegate function and changing the order of the arguments. I fixed this by downloading the latest jQuery validate plugin.

It was something that racked my brain for a bit, so in case anyone else runs across this issue, this would be a good place to start :)

Thanks.

from jquery-ujs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.