Code Monkey home page Code Monkey logo

Comments (3)

tonydspaniard avatar tonydspaniard commented on August 17, 2024

It is not the plugin and its the plugin, let me explain. The plugin doesn't initialize for live events. What you need to do is to hook the pjax event 'pjax:complete' with a reinitialization of the switch button if found.

Yii2 works with pjax at its core, check my solution for the challenge I had with the editable column: https://github.com/2amigos/yii2-grid-view-library/blob/master/assets/editable/js/dosamigos-editable.column.js#L153

from yiiwheels.

BrainFeeder avatar BrainFeeder commented on August 17, 2024

Thanks for the help. I managed to get it working.
There is this other error which I can't figure out. The Masked input plugin does not load at all. In the console I get the error: "TypeError: $(...).mask is not a function".

/* In the .js file I noticed "$.mask" is used instead of "$.fn.mask". Since their are so many models (which I haven't tried all) so I am not sure if this was a typo. It seems to be consequently used in the file as "$.mask". */

Never mind the previous part. Since I have tried many things trying to get it to work (even updating the plugin to the latest version) I forgot that it was not the original file that is included in this state of the art Yii extensions :)
Anywayz, I get the same error if I put the original 0.9.0 version back in place.

from yiiwheels.

tonydspaniard avatar tonydspaniard commented on August 17, 2024

@BrainFeeder So this issue is not solved?

from yiiwheels.

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.