1,034,183 questions
0
votes
1
answer
46
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
42
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 ...
-5
votes
1
answer
44
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, ...
-1
votes
0
answers
114
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
116
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
308
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
211
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
93
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
75
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
70
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, ...
Advice
2
votes
1
replies
199
views
How do I make fully customisable home page for user
I am trying to make a fully customisable home page for the user. The idea is for it to be like OBS. You can add or remove windows to your home page, and you can resize them so each window takes up the ...
0
votes
0
answers
24
views
Triggering Change Event in Leaflet and jQuery [duplicate]
I am using leaflet.js to create a map and add a select box to the map. That works, but the change event, which used to work, does not work anymore.
I start by creating the two objects that I need, the ...