I am using Slick Slider JS to build out a history timeline. Each date range navigation item is connected to multiple slides using a data-group attribute. I am needing to adapt my code to transition the timeline__nav ul left or right using the previous and next buttons when the first slide with a matching data-group attribute slides into view. My
Tag: jquery
jQuery number format for HTML input number with dynamic decimals
I’ve seen a lot of similar threads or library but I haven’t found one I need. I have preexisting code with many input[type=number] in the forms. I need to format the number value to local format when form is viewed at first load or when cursor/pointer is out of focus (onblur), and unformat the number to raw input when onfocus
Set uploaded photo as website background image [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question I wrote a very simple image upload script, after uploading the image I thought of making the background of the linking screen the uploaded image
Javascript/jQuery to get subarray value with random array key
I have these below JSON data: Assume above array variable is var data; For this subarray jQuery331045811028719032642 is auto generate. My question, how to get seconds array value using jQuery? I tried this: but it returns undefined. Answer You can get the seconds using Object.values
How can I get data-id from multiple elements with single onclick?
as the title says I have multiple buttons which they have data-id. I want to open fancybox modal by getting the clicked buttons data-id. Each element on click will open their own modal. I can’t use class selector because this function is attached to somewhere else, and I know that $(this) here doesn’t mean clicked element. Thank you for your
jQuery append input value to iframe data-src
How can I append an input value to data-src iframe in jQuery. I am doing like the above snippet but the console.log returns only the initial value without the input value that should be appended. Does anyone know a way to do it? Answer You did not update data-src. You updated src attribute.
How to display dynamically generated buttons vertically with spaces in between them
I am using this button to generate other buttons one by one when clicked Here is the div I am using to store the generated buttons. Here is the Javascript/Jquery that is doing the work. I am able to provide a name for the button Here are the issues I am facing Everything works fine but the buttons are generated
Alert with progress bar similar to toast JS
I’m trying to make an alert with descending progress bar. I need that when the mouse passes over the alert, the progress bar will stop and when I remove the mouse it will continue where it left off. After completing 5 sec, it closes by itself. I put the option when clicking on the alert, close it, but it is
How do I get total addition of three group?
Here I three groups with range slider and input. I want to apply two things. Multiplication of range slider and the input. And at the end Addition of all multiplication. I have a different ID for all input types. I know the code is wrong. Answer You can give common class to your amt input as well then use index
Trying to pull data from a table using jQuery
Just to give a background of the question, I am trying to pull data from an html website which was made using tables. I have managed to pull most of them but there’s just one thing which is troubling my brains. Maybe I need a break from work? I have included all the code in a fiddle which can be