All Questions
Tagged with eventhandler jquery
35
questions
-1
votes
0
answers
63
views
jQuery: onclick event works only the first time
Trying to add two event handlers on two elements respectively. The second element will only appear in DOM after users clicks the first element. My problem is the first event handler only work for one ...
2
votes
1
answer
379
views
Add different sounds to different buttons
I am working through a project using Javascript and jQuery. The projects requires me to add sounds to buttons. A different sound should play depending on the button I click. I know how to add a single ...
1
vote
0
answers
23
views
what is the best jsript event handler to use when data is change through other script for select? [duplicate]
I am trying to make, the value for the value media and unit media, change when the object is select, yes the object do change when I change upon the available item to select, but my target is to ...
1
vote
1
answer
137
views
eventHandler trigger multiple times when using .on() only
function changeStatus() {
$('#dataTable tbody').on('change', '.orderStatus', function () {..code}
}
function showOrdersInModal() {
$('#dataTable tbody').on('click', '.fa-eye-btn', function (e) ...
0
votes
1
answer
105
views
Passing custom data is different between focus and change event jQuery
I have a fiddle at https://jsfiddle.net/ws1hz5uf/ which demonstrates how to pass extra data to the target event.
The first button (Go 1) trigger focus on the text input
<div class="enclosing1&...
0
votes
1
answer
62
views
How to dynamically set the event handler type?
I would like to dynamically set the event handler.
Example:
$('.test').on( 'click', function() {
// My Code
});
Expecting (pseudo) code:
// .on or just on
var eventHandler = ".on";
$('....
-1
votes
3
answers
286
views
JQuery clearing all text boxes
I have a question. I am trying to clear the text fields of a form once a button is clicked.
This is the HTML for the input type:
<input type="button" id="clear_entries" value=&...
0
votes
1
answer
119
views
Dynamically added element is forcing a reload
I have a table that has a range of elements inside of it.
I have registered some event handlers and add these elements dynamically through injecting new html.
Everything works for the original ...
0
votes
1
answer
43
views
jQuery / Javascript - function(event), (event => ), function() [duplicate]
I am new to javascript and jQuery and am trying to understand events better.
Is there an ideal time to use function(event) {} vs. (event => {}? Can you do the same things with either and it's a ...
0
votes
1
answer
29
views
How to get the class name with parent function in jquery
How can I get 'field_wrapper_1' class name while clicking the function addIncludeTextBox?
<div class="field_wrapper_1">
<span class="error php-error" id="php-error_includes" style="...
0
votes
2
answers
1k
views
Keyup Event Handler in dynamically added elements
"Total" input doesn't work in the added elements! It works only in the first row! Any help please?
.........................................................................................................
1
vote
2
answers
148
views
form submit event handler refreshes the page + jQuery
I made a template in index.html
<div id="template" style="display: none;">
<form id="formSubmit">
<input type="hidden" id="price" />
<...
1
vote
2
answers
1k
views
Kendo ui - How to attach select event for kendo mvvm autocomplete field to the viewModel
Is there a straight-forward way to define a "select" event handler function within the mvvm html attributes for a kendo autocomplete field?
For example, here is a working version of an autocomplete ...
0
votes
2
answers
228
views
jQuery click event fires on parent element multiple times
https://jsfiddle.net/50Lw423g/2/
gameLogic: function() {
console.log("GAME LOGIC");
alert("Your Turn!");
var that = this;
$(".game-screen").on("click", ".tic", function() {
...
1
vote
2
answers
180
views
How to add an EventListener that listens every click on window besides a specific element
I have a simple html file that has only one input field:
<input value="Hello">
What I want is that the moment the user clicks on the input field, he/she will be able to edit the text, and ...