Category: jquery

Display a switch by a flag

I need to display a switch if a flag in my database is setted to a positive value. <div class=”form-group m-form__group row vertical-padding10″> <label class=”col-form-label col-lg-2 col-sm-12″>Switch</label> <input id=”switch” name=”switch” data-switch=”true” data-size=”small” data-on-color=”success” type=”checkbox” checked> </div> How can I execute…

Simplemodal on Symfony Webpack

I’m trying to implement simplemodal (https://www.ericmmartin.com/projects/simplemodal/) on my Symfony project compiling assets with Webpack. I’ve downloaded and added to my ‘assets’ folder. This is my webpack config: .addEntry(‘app’, [ ‘./assets/js/jquery.simplemodal.js’, ‘./assets/js/app.js’, ]) An I have uncommented .autoProvidejQuery() Then in app.js:…