I’m new to jQuery, my functions adds class active to buttons when different inputs have value. However, only one function out of two works at once. Both functions work just fine separately. Maybe I am missing something? I writing these functions directly on html file without document.ready, but it didn’t solve the issue. Is there a way to make both
Tag: jquery
How to let JS code allow both input and textarea
I have some JS code that will turn my code bold, italicized, or underlined with user input, so if the user checks bold the text will be bolded. Here is the code: It is giving me an error, and it is not bolding/italicized/underlined. I think this is because the JS code is checking for input, but the tag is textarea.
Disable or enable only the current button
With a PHP for each cycle, I’m bringing articles from the database. In those articles, we have a comment section with a form. I want to check with jQuery if there is something written on the input before the comment is sent. As the articles are being brought with a PHP cycle, I want to check only the article in
Multidimensional input : update index when clone existing item
Is it possible to change the index of the last item of a multidimensional input when my new item is created ? Let me explain. I have a button that is clone an item from my list, into my list. Each item contains several properties (date, category…) This is an example of what I have when I display my form
how to force a collection of inputs to always have the same value when typing in them?
I’m looking for a method to give the same value to a collection of inputs when i type something on them, lets say we have 10 of them,and i type the word “dog” to one of them,then all of them get the word “dog”,then i type the word “cat” to an other one,every one gets the word “cat”. Something like
Loading text from a file in JavaScript
I have created a function to get text from a file using an url. The function uses $.get() of jQuery to fetch the file. The function works fine but the problem here is $.get() is asynchronous so the order of the output is not predictable i tried changing it to synchronous but it freezes the page completely i have tried
Hide and show images on hover
Hide and show images on hover. Class artists-main has artists names and class artists-image has images of the artists. It’s working fine but my code is lengthy. I have round about 50+ artists and page will be filled by jQuery code. I want to shorten it. Answer use same class name
How can I fill the inside of a SVG?
I am trying to fill a heart shape SVG on click using html, css and javascript, but it doesn’t seem to work. Here is the svg code : I have tried multiple solutions, such as using “fill” in CSS which only fills the stroke around the svg, but also removing everything in the path from the second M which only
Undefined error even though variable is declared
I am trying to create a card where all information are stored. However after I created the variable and tried to append text to it, I got an undefined error. What should I change? Here’s the error: Uncaught TypeError: title is undefined createCards http://localhost/Projects/diary/:86 createCards http://localhost/Projects/diary/:75 success http://localhost/Projects/diary/:103 jQuery 6 http://localhost/Projects/diary/:96 jQuery 13 diary:86:13 createCards http://localhost/Projects/diary/:86 forEach self-hosted:206 createCards http://localhost/Projects/diary/:75
”detect” if user has typed a sequence of words using javascript
im trying to do an easter egg in my website, and i want to detect if the user has typed some words in sequence and in 30sec. The words wont be typed in any textarea or input, it will be just like you land on the page and start typing the words ”hello im Darius”, or you are on the