Giter Club home page Giter Club logo

Comments (5)

agittins avatar agittins commented on September 7, 2024

Re the bit about how I changed the event callbacks, I have rolled that back, events are working with the vanilla version of jquery-filedrop.js, but still the way that I am attempting to use multiple instances is not working for me.

from jquery-filedrop.

nphase avatar nphase commented on September 7, 2024

Having the same problem here. Seems to me like opts gets overwritten with every .filedrop() call..

from jquery-filedrop.

hansent avatar hansent commented on September 7, 2024

Like nphase said, opts gets overwritten each time you call .filedrop().

Here is a quick fix: https://gist.github.com/1384760 It's not the correct way to do it...I've just moved all the functions accessing opts inside the scope of .filedrop(). It's not very memory efficient, a real object oriented approach, or attaching opts to the corrosponding element using e.g. $.data probably be better? Works ok if you just need two different drop targets though...

from jquery-filedrop.

mmmries avatar mmmries commented on September 7, 2024

I have this same problem as well. Didn't notice it until I had already started using this plugin in a production system. I've submitted a pull request based on rewrite much like the gist of hansent. It just makes opts private to each instance of filedrop and also makes the helper functions private as well. I guess if you put a bunch of instances on a single page you could end up bloating memory, but that wasn't a concern for my system.

from jquery-filedrop.

weixiyen avatar weixiyen commented on September 7, 2024

hqmq fixed this in #40

thank you.

from jquery-filedrop.

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.