Code Monkey home page Code Monkey logo

Comments (3)

adamcoulombe avatar adamcoulombe commented on August 16, 2024

You need to call $("select.yourselectbox").change() in your Ajax callback to fire the change event. Then the plugin will respond and update the span.

On Dec 14, 2012, at 12:13 PM, michar11 [email protected] wrote:

Hi,
Great plugin.
I have a select that get its values through an AJAX request.
After it gets new values the selected value remains the same
although that option may not be available anymore.
More over select.val does not make any difference. (It should set the selected value)

Thanks and Good luck,
Michael


Reply to this email directly or view it on GitHub.

from jquery.customselect.

michar11 avatar michar11 commented on August 16, 2024

That works. Thanks.
Maybe you could add native support so
existing code wouldn't have to be changed.

from jquery.customselect.

adamcoulombe avatar adamcoulombe commented on August 16, 2024

It's a good idea but there is no native event to listen for select box content changes to my knowledge other than using DOM mutation events.. Which i understand can be performance intensive and have spotty browser support. The other way would be to set up a timeout the check periodically for content changes.

You are welcome to take a stab at implementing this. But to me it seems like a special use case and would be much easier to call the change event manually since you are already doing the work to repopulate the select box anyway.

On Dec 15, 2012, at 5:54 AM, michar11 [email protected] wrote:

That works. Thanks.
Maybe you should add native support so
existing code wouldn't have to be changed.


Reply to this email directly or view it on GitHub.

from jquery.customselect.

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.