Coder Social home page Coder Social logo

Comments (9)

paulstraw avatar paulstraw commented on July 24, 2024

The events were namespaced in he last update. So, if you were triggering "update" before, you'd want to trigger "update.fs" now. Give that a shot and let me know.

from fancyselect.

hudsonperalta avatar hudsonperalta commented on July 24, 2024

I am calling the function on change similar to the below js.

$('select').on("change", function() {
    if (this.val() == "NEW") {
      $('#newAcct').slideDown("fast");
    }
});

from fancyselect.

paulstraw avatar paulstraw commented on July 24, 2024

Did you try changing to change.fs as described above?

from fancyselect.

hudsonperalta avatar hudsonperalta commented on July 24, 2024

I will try it in the morning. I just feel that if you want this amazing tool to replace all select boxes on a site you shouldn’t have to change how they typically function.

from fancyselect.

seanwash avatar seanwash commented on July 24, 2024

Hello @hudsonperalta,

It's not that we're changing how something would typically function just because, it's that we don't want our plugin to conflict with any other plugins that you might include in a site as well. By namespacing events we can ensure that when you want to fire something like .change on FancySelect, it affects only FancySelect and not any other elements that might have .change bound to them.

Here are a few good reads on the subject:

http://css-tricks.com/namespaced-events-jquery/
http://www.learningjquery.com/2007/09/namespace-your-events/
http://api.jquery.com/event.namespace/

Hope that helps!

from fancyselect.

hudsonperalta avatar hudsonperalta commented on July 24, 2024

First of all I want to make clear that I my intentions are not to bash your hard work and your amazing tool. I think you did an amazing job and I am a big fan of FancySelect and it's developers. But as a big fan I feel it's my duty to offer suggestions. I understand the need for namespacing events in most cases; especially on a .click event that is used throughout a site but FancySelect is specific to select boxes and I feel should function just like all select boxes. My plan was to use it on a pretty big site and I would hate to have to weed through others code to change .change to .change.fs.

Again, thanks for your hard work!

from fancyselect.

seanwash avatar seanwash commented on July 24, 2024

No worries @hudsonperalta! Thank you for the kind words :)

from fancyselect.

paulstraw avatar paulstraw commented on July 24, 2024

Hey @hudsonperalta. After thinking about this a bit more, we might have a future solution. We're a bit busy to make OSS improvements at the moment, but I'm going to leave this issue open while we think about it and such.

from fancyselect.

hudsonperalta avatar hudsonperalta commented on July 24, 2024

Any updates on this? We are interested in using FancySelect on a big mortgage site but we really want it to use it to replace all select boxes on the site

from fancyselect.

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.