1,034,184 questions
Advice
1
vote
6
replies
124
views
Is jQuery relevant today?
I am a FULL STACK DEVELOPER , my tech stack is MERN, but I am curious about jQuery , php . I do not know why but I just feel like I should know about these like how jQuery works and how reactjs ...
-7
votes
1
answer
108
views
My code keeps returning an error that says "e is undefined" whenever I run it? [closed]
I'm trying to make a graphics test using tables as individual pixels, where you can move around using WASD, with the player character being the "@" symbol.
I'm using this code:
<!DOCTYPE ...
1
vote
2
answers
84
views
How to toggle bootstrap nav pane from a button
I have successfully implemented a tabbed pane design with collapse for small screens.
On one of the panes I would like to include a button which toggles to another pane.
I have tried unsuccessfully ...
1
vote
1
answer
48
views
TextChanged Postback not firing when pasting input
I’m having an issue with this JavaScript: when I paste a number, the TextChanged postback is not triggered, whereas it works correctly when I type the value manually.
It’s a general control, and the ...
-6
votes
1
answer
50
views
jQuery .addClass not adding the class [closed]
In a WordPress page editor HTML block I have:
<script>
jQuery(document).ready(function() {
jQuery('.wp-block-button__link').addClass('sg-popup-id-2331');
});
</script>
However, ...
0
votes
0
answers
123
views
JQuery gallery with multiple instances not working
I have a webpage where I want to get multiple instances of the same JQuery-powered gallery tool.
The first instance works just fine; all the individul items are clickable, the arrows work, and moving ...
-6
votes
2
answers
124
views
submitting form and using preventDefault() in validation but can no longer submit form after validation is addressed php/jquery
I am trying to submit a form and validating data using jquery by calling preventDefault() when it's incorrect. After addressing the validation error, what I want is to submit the form when the submit ...
Advice
0
votes
1
replies
37
views
How to toggle icon/image of Bootstrap button with jQuery and data attributes?
I have this button that toggles it's text from "Show more..." to "Show less..." whenever it's clicked:
<button
class="btn btn-sm btn-secondary"
title="...
Best practices
1
vote
7
replies
117
views
HTML: set onclick event handler in external script file before user clicks it?
I am removing inline JS from HTML files due to CSP in an existing project, so this old code:
<input value="Click here" type="submit" name="submitA" onclick="...
Advice
1
vote
19
replies
315
views
How can I deal with this javascript variables problem?
I have a quiz with 5 questions with a couple of answers you can choose from each, it's always single choice, so you will have 5 variables in the end, one per question q1="",q2="", ....
Advice
1
vote
17
replies
212
views
How should I share, save and combine JavaScript variables across HTML sites?
I am passionate about writing a personality/psychology/dating website. I know how to use variables a bit, but I don't know which is the best way to store them. There are cookies, sessionstorage and ...
1
vote
0
answers
95
views
how to use lightGallery v1.10 with vite and Laravel 12?
I am trying to add lightGallery v1.10 into a Laravel project with Vite. The following is my bootstrap.js file:
import $ from 'jquery';
import jQuery from 'jquery';
window.$ = $;
window.jQuery = ...
0
votes
3
answers
75
views
Disable Submit button *after* jquery.validation
I am using jquery.validation in an ASP.NET MVC form and would like to disable the submit button when jquery.validation passes and form actually submits. The validation triggers in the background (I am ...
Advice
0
votes
6
replies
77
views
I want to know if there exist a shorthand for .on() -> 'input' in jQuery
I am trying to display the updated length of the input username by a user. I know that we can use .change() shorthand but it updates after the span has lost focus. I want something to update it ...
1
vote
2
answers
71
views
Jquery accordion : how to call only once
I have many accordion elements that are added by an ajax function.
When the elemet is created in ajax i call the function:
$( ".accordion" ).accordion({ active: false, collapsible: true, ...