Newest jquery Questions

Q&A for professional and enthusiast programmers

Jquery on 'click' event working for one selected id but not both

I'm having a strange issue I don't understand, I've been working on a webpage on which I can download images taken from a webcam or phone camera. Since the beginning, I used a tag with a "download" ...

Object Literal Pattern: can't access a data attribute when binding events

Background: I am trying to dry up my code using the object literal pattern. The object: Here is my object: (function(){ var bookingForm = { init: function(){ this.cacheDOM()...

Stop Link href when certain condition is met in jquery

I have large no of files on my website and I'm trying to put download limit for every user. download link looks like that. <a class="btn btn-primary" id="download" href="<?php echo $...

NEED URL Keyword

<a href="/shop/shopbrand.html?xcode=071&mcode=008&type=Y">NEW</a> <a href="/shop/shopbrand.html?xcode=071&mcode=009&type=Y">REPI</a> <a href="/shop/...

How to remove partial duplicate values in jquery array

I have a single level array of key/value pairs, like this: var user_filters= ['color=blue', 'size=small', 'shape=circle', 'size=large', 'shape=square'] I need a function to perform the following: ...

How I could create a theme selector for Django (ideas, advices, …)

I'm developping and improving my Django website and I would like to get advices about graphic charts and what I can do with Django. When I'm developping my software, I adopted a graphic chart ...

Jquery Retrieve Value from Dynamic looped input with same class?

Jquery : 3.x, Tomcat7 Problem : var htmlStr for(var i=0;i<data.length;i++){ htmlStr += "<input class='my_button' type='button' data-value='" + data[i].value + "' value='"...

Multiselect does not fire change events on mobile devices when clicking the option

First, the code: $('#residentialobject-filter-form-modal select, #residentialproject-filter-form-modal select').on('change', function (e) { if ($(this).val() == null || $(this).val() == '' || $....

Detect Youtube iFrame state changes (play/end/etc…)

Everything is in the title, I "just" would like to detect when my YouTube iFrame state is changing. I'm using the API to search and display a set of 10 videos (with youtube.search.list), so I'm ...

Number input and jquery [duplicate]

I have this table: <table id="product" class="table table-bordered table-striped"> <thead> <tr> <th>Id</th> <th>Cantidad</th> ...

How to prevent all radios and checkboxes on my webpage from turning into bootstrap switches

I have included the bootstrap switch JS on webpage. It is causing ALL radio and checkbox inputs to turn into bootstrap switches. Is there any way I can control this behaviour so that only some of the ...

I dont want the toggle functionality when the target is the same

I'm trying to create a step by step order, and I'm using data-id="x" to tell which content to be visible when it has been selected. What I am trying to accomplish is if the data-id has the same ...

Highcharts Renderer Button ID

I've rendered the buttons to multiple Highcharts, but I need to know which button I click.. Example API

Check to make sure all fields are filled Jquery

I'm trying to make an easy validator in jquery for my input fields. Currently i got the following: function checkInputs(){ var isValid = true; $('.input-required').each(function() { if($(this)....

$.ajax is not a function in main.js electron

I would make a async call in main.js on electron. I tried to do with Jquery but return error $.ajax is not a function I have tried with: mainWindow.$ = mainWindow.jQuery = require('jquery'); let $ = ...

not enter in controller when using script of create input file for upload

i need to use dynamic upload form . i used this script for add input file in asp mvc : <button type="button" onclick="adduploadfile()" class="btn btn-success">افزودن فایل</button> * ...

How to link a click event with an event that didn't upload yet [duplicate]

I have a sample my JS code sample: $('.owl-next, .owl-prev').on("click", function() { alert("1"); }); There is a click event on two buttons, the problem is that these two div's configure ...

How would I move these items inside an array into objects within an array?

I have an array which contains on the left side of the colon, the name of the level, whilst on the right side, it has the difficulty the level has been completed on. I want to be able to put this ...

jQuery automatic slideshow buttons

I'm trying to make simple slideshow by this tutorial: https://www.w3schools.com/howto/howto_js_slideshow.asp But I wan't automatic, and with dots under slideshow, to select.. I've combined two codes: ...

how do i prevent loading of hidden HTML tags? Or deleting them totaly from the page

I asked this question before but never got the answer which worked, I have this input fields : <form method ="post" action="select.php"> <input id="nol" style="width: 350px;" type="text" ...

Proper way of doing AJAX request to retrieve data from database

I got a database with one table in it. Table has Company and Time columns, and some more, but these two are important. So the user makes an appointment through the filling of the form. In the form I ...

Searching fails after modifying cell value

I have the following code (snippet attached): <!DOCTYPE HTML> <html lang="en"> <head> <title> Exact matches overview </title> ...

Reload window on resize browser window

I want to reload the page on browser resize only, I tried the following code it's loading the browser again and again however I am not resizing the browser window. $(window).on('resize',function(){ ...

Send ajax request with multiple types of data

I am working on a application where user can set values via an interface and send ajax request (similar to as rest api). I would like to know how to send data belong to multiple types in a single ...

save value in <a> attribute and get the value again

I need to store a value in attribute or button it doesn't matter and i need to get that value again. My approach that i need when any one click that link or button i will get the value and do some ...

How to store the URL and separate each of the word

Hi I know how to store the URL parameters using the below JavaScript but is there a way to store each word after the slash. Example: I have the URL: http://localhost:9000/Database/Users/username/...

Reveal a small splash screen, before fading to main content

See this website here There is a small splash which fades out revealing the page. How is this animation done exactly? Can you just use jQuery fadein and fadeout? Something like this perhaps? Then ...

how to get images in bootstrap carousel dynamically

Hy, I have a bootstrap carousel. I have two column in each row. I want that my images come from database through php. here is my code: <!doctype html> <html> <head> <meta ...

How to echo id value as variable in bootstrap modal window?

I thought this would be easy enough but it's giving me problems. I tried searching other answers to solve this, but to no avail. I have a list of buttons where the id value is dynamic. <a href="#" ...

My script doesn't work properly and doesn't give an error

Hi I was just trying to make a button that slides up and down with JQuerry but it works 50%. When I press "Slide up" it does work but it doens't work with "Slide down". It doesn't give me any errors ...

Post restful method java error

Can anyone tell me why this error? Server Log: StandardWrapperValve[ws_site.ApplicationConfig]: Servlet.service() for servlet ws_site.ApplicationConfig threw exception java.lang....

Color TD in tables with rowspan and colspan

I'm trying to color some TDs in my table. But it doesn't work as intended, as it colors other TDs, as well. Here, I tried to color the second TD: The problem seems to be that I'm using colspans and ...

username availability using jquery

I've created a test index page so i can try some username availability code out before i place it onto my site. Below is the test index page along with the jquery and php files needed to run along ...

jQuery create multiple HTML elements without overwriting old HTML

I would like to make a dynamic jQuery function that counts the results from the array and than makes for every object in the array an HTML element. The array is made by an SharePoint API. So if there ...

Extract the Id's number of multiple elements jQuery

I have this simple code $('[id^=pz]').change(function() { //Getting the numbers after the letters "pz": //1 //2 //100 }); <input type="text" id="pz1"> <input type="text" id="pz2">...

Changing the hide show toggle effect?

I have an element that works just fine with the following code. It's an object #obj1 that is hidden when loading the page, but appears when clicking on #obj2. #obj1{ position:fixed; width:...

$(document.documentElement) target specific element

I have a function like this: jQuery(document.documentElement).on('click touch', function(e) { // check if $(e.target) matches with $('ul#menu-navigation > li.menu-item') // or any child ...

Jquery- Find a word in a sentence and add span

I am writing a function to find word in a sentences and add span on top. This is the code but it is not working. Can anyone point out my mistake? Thanks function find_and_add(element = "", ...

Static nav to fixed nav, causes page to “jump”

basically i have a navbar that becomes fixed when the user starts scrolling, with some transition stuff going on, to make it look nice. My problem is, when my navbar becomes fixed, the whole page ...

How to disable the calender popup from bootstrap date picker using jquery?

How to disable the calender popup from bootstrap date picker using jquery?? $("#id").val('').attr('disabled',true).trigger("liszt:updated"); is not working also .prop is not working..

Button doesn't work in php with jQuery

my button doesn't work when I click on it nothing happens. This is my HTML for it: <form id="myform" name="myform" action="senden.php" method="get"> <ul><div> ...

How do I call a partial view from a view and generate a drop down list?

I am have 2 drop down lists and based on the first one I want to populate the second one. So I first generate the second drop down list as an empty list and then using my action controller I try to ...

upload functionality of image in JqGrid.js

I have multiple column in my jqgrid and i want the inline editing functionality. I have one column where image is going to be displayed and if user click the image it should provide the functionality ...

How to start and end a dynamically generetad datetime highchart's xAxis on the first and last tick

I have several different highcharts that all can vary on what date-time they start and stop, so a hard-coded solution will not work. What I am trying to achieve is to have the xAxis labels start at ...

How to combine load & resize with $(window).one(“scroll”, into one function

I have a function that needs to fire on load, resize and the first time scrolling. How can I combine the following two functions in one, to do that? Alternative ways are welcome too of course. $(...

Meteor how to pass the data of an array in another array

I am trying to make a form where you have a list with the names of your friends to invite them every name with a checkbox i already get the data and insert the data in a collection as an array but now ...

Polling using Jquery Ajax for JSON response

I have the following Jquery Ajax code to Handle JSON data, whihc work fine . the question I have is related to polling . How can I use polling to check and wait for until the status is 200? Once teh ...

jquery tablesorter highlight selected row until another row is clicked

I'm using the jQuery tablesorter library along with jQuery UI dialog. The first column in each row is a link that opens the record in a modal dialog window. What I want to accomplish is to highlight ...

bootstrap-select with JQuery slimscroll display error

I'm currently using boostrap-select 1.12.2 plugin to display some filter widgets. Thoses widgets are displayed on the left side of the page, and are dynamically added. The widget list can be quite ...

JQuery accesses only the first item in the class

I am using Kendo UI, and what i am doing is refreshing the charts by class so that i can refresh all charts without accessing each one by ID. this is the code: $(".k-chart").data("kendoChart")....
Translating... 0%