Skip to content

Tag: jquery

Unable to hide and show fields with select

I am trying to show and hide fields with respective selected value from tag. But it is not working. This same code is working perfectly in my other site. But it is not working here, don’t know which thing i am missing. Here is the code Answer Your script needs to be told to wait for the window to be

Showing / Hiding Div With jQuery

I’m using toggle() but it’s not working. My script is in the footer: or I’ve also tried addClass(): Basically I’m just trying to toggle between showing and hiding the form divs. When product-suggestion-form-container is clicked on, form-div-top should show. When contact-us-form-contain…

keyup or change event on input hidden is not working

If the Hidden input takes its value from a text input, how can I monitor the change and implement something when changing the Hidden core value? example: Answer You can fire keyup explicitly using: You have to just add this line: $(‘#input1’).trigger(“keyup”);

Javascript event listeners and arrays

I am trying to recreate a scratch-to-reveal-image effect with 3 images in an array triggered by 3 buttons. My event listener is not working, as you can see, it shows the same revealed images no matter the button. The event listener syntax has confused me a bit and I would like some help on that specifically. …

Jquery retrieve an attribute value for the selected rowIndex

I have an event when a table cell is clicked that is fired properly. Then, I am trying to get the row index of that selected cell, but I always get “undefined”. I see the correct rowIndex value from $this object, but how to get it? Seems a basic question but I tried different syntax and javascript…