Skip to content

Tag: jquery

Duplicate fields in a form upon selection

I made a form to select skills. After the 1st selection is made, a 2nd list is shown with options depending of the 1st choice. Then, a “+” button allow to duplicate the fields ans add another skill. My problem : The inital form is OK but when I press “+” the second form created doesn&#…

Using conditions inside JavaScript

I have this infinite scroll code which works perfectly fine. I m trying to use if-else conditions inside my Code but due to some syntax (i think) error its not echoing out. My code goes as : Please note that the whole infinite scroll code works fine if I m to remove those if-else conditions. Any help is great…

How to use click event on bootstrap modal

I generate many bootstrap modals with a php script, and I’d like to edit some input of it when I click button “save changes”. ModalIDs generated are something like “ModalID0000”. But nothing happens with my script when i click on “save changes”. EDIT : 1st mistake fou…

JQuery autosubmit does not work in Safari

I have a form that I want to autosubmit using JQuery. However, it doesn’t work in older versions of Safari (macOS Mojave, iOS 12). It works in Chrome, Firefox, and iOS 13. So, this is most likely a Safari bug, but I have a lot of users with devices running the older software, so I need to work around it…

Drag multiple divs with javascript

I’m interested in dragging some divs by clicking in their header. I followed instructions of W3SCHOOL https://www.w3schools.com/howto/howto_js_draggable.asp and some advices founded in the web. This is my actual code: I’ve created a Jsfiddle that works with entire divs. I would like this result bu…

How random option catch correspondent number?

How random option catch correspondent number ? For example: If question random option is (4) (2) (3) (1) arrangement Answer should be (1),because set class=”correct” in question1 option1 but in the case (1) is X (wrong answer). I guess it get <div> position, so array and real number not matc…