Category "jquery"

How to implement multiple tooltip show event using popper.js

How to implement multiple span with tooltip using popper.js HTML: <div class="panel-custom"> <span class="button" aria-describedby="tooltip">Tes

Exception: org.springframework.web.bind.MissingServletRequestParameterException: Required String parameter 'params' is not present

When i clicked the edit button the values from dataTable should display in form. But somehow it doesn't work. Below are my codes for reference. Call DataTable:

Adding custom CSS and JS to Shopify

I am working on getting vertical tabs for a page on Shopify, using the 'Atlantic' theme. As this theme does not have vertical tabs by default, I have used the

How to get current time with jQuery

The following returns time in microseconds, for example 4565212462. alert( $.now() ); How do I convert it to a human readable time format, such as (hours:mi

Timing in JS - multiple setIntervals running at once and starting at the same time?

Let's say I have a function: myFunc = function(number) { console.log("Booyah! "+number); } And I want it to run on a set interval. Sounds like I should use

Auto resizing the SELECT element according to selected OPTION's width

I've got this select element with different option in it. Normally the select element would get its width from the biggest option element, but I want the select

Debugging ajax flow

I am really confused on a program that I made. A few days ago, it was working just fine, but now I am having problems with initializing it. I think I've figured

Not allow Korean character(Hangul) for input text

I want to allow typing Latin Characters but I don't want user can type Korean Hangul characters. Please help me answer. Thank you in advance.

Popup Window and PHP form

I've created a contact page and a separate PHP page to receive the posted data. I'd like to make the PHP open in a popup window. I've tried methods online witho

Detecting where a submit event came from with jQuery

I need to detect how a user submitted a form to generate some statistics. They can either press enter when typing on the input or they could click the submit bu

how to catch scroll event caused by hash bang anchor link?

I am just wondering if there's a better way to approach this So, say you have jump to link using anchor tag: www.example.com/#about opening that link will ma

How to copy text from a div to clipboard

Here is my code for when the user clicks on this button: <button id="button1">Click to copy</button> How do I copy the text inside this div? <

Using the Same jQuery Function in Separate Buttons

I'm trying to get each button to change color on click. However, I want to separate buttons 1-3 from buttons 4-6 so they are independent from each other. I wa

How to get URL parameter using jQuery or plain JavaScript?

I have seen lots of jQuery examples where parameter size and name are unknown. My URL is only going to ever have 1 string: http://example.com?sent=yes I jus

Search word and scroll smoothly on page

My client wants to add a search box on specific pages that will allow their user to search for a question and it will scroll to that text. This way it's easier

Create array of unique objects by property

I created an array of objects like so: [ { "lat": 12.123, "lng": 13.213, "city": "New York" }, { "lat": 3.123,

Using jQuery, why is this function being called when I only click one of the two keys?

I have this code: $(document).bind('keydown', 'ctrl+1', function () { alert('You found the hotkey ctrl+1!'); }); But if I click on either the Ctrl or the 1

get json array from servlet using ajax

I have to json array in my servlet. I want to fetch json array value and print in to jsp page using ajax. below is code JSONArray htags = new JSONArray();

How to rotate image in jquery?

can you please tell me how to rotate a image like that : Take human being body Example : First we stand our face in front side. When I click on image our face

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

I'm trying to create a common constants file to share between php and javascript, using JSON to store the constants. But I'm wondering why pass the JSON from PH