Category "jquery"

Append external file to head

I'm trying to load a file into the head… but also keep what is currently in the head. At the moment… the file loads into the head, but it removes

Add a transform value to the current transforms that are already on the element?

Let's say I have a div that had translateX and translateY values added dynamically. <div class="object child0" style="-webkit-transform: translateX(87

jQuery.on() does not work in WordPress admin panel

I'm writing my own WordPress(4.1.4) plugin which uses some JavaScript code in admin panel. The first issue is $ object is undefined, so I use jQuery instead.

Filtering result based on checkboxes with jQuery using value and class

To start off with here's a fiddle of what I have right now: link to JSFiddle, code below: <!DOCTYPE html> <head> <title>Homes Selection Te

Pop the last state from history

Is it possible to get the html of the last state pushed to history stack, something like this: history.pushState(null, null, {html: $('body').html()}); Chan

generate 4 digit random number using substring

I am trying to execute below code: var a = Math.floor(100000 + Math.random() * 900000); a = a.substring(-2); I am getting error like undefined is not a funct

Put only integers in x and y axis of bar and line graphs - Flot

In Flot.js, bar graphs and line graphs have numbers as the coordinates in the x and y axis by default. How can you make the coordinates such that the numbers

Best way to scrolldown onpageload

I have the following code: <script type="text/javascript"> window.onload = function () { window.scrollBy(0, 100); } </script

Best way to trigger an ajax call for loadining infinite elements?

Problem: I am writing a website that shows users photos. By default my api returns a certain number of photos by default (20), I want if the user keeps scrol

jQuery DatePicker set time and date

Hello I was asked to modify some code. We got something like this: $("#expiration_datepicker").datetimepicker( "option", "disabled", false ).attr('value', '');

Ajax call populate Typeahead Bootstrap

What I'm trying to do is to get a json object via Ajax and populate the Bootstrap Typeahead with just one kind of value. Here is my code: nameTypeHead: functi

Dynamically changing the content of: meta property="og:image"

I want to change the main photo in a web page, I just have the url page. So I decided to use the meta written for Facebook sharing. I want to change the image

How to animate text with css font-weight property in jQuery ? normal to bold

I am trying to animation like opacity effect, which turns text bolder slowly. Tried usual animate() method but didn't work. Searched for it but coundn't find an

Error "TypeError: $(...).children is not a function"

I try to select a certain DOM element with jQuery. The HTML content: <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquer

what is the difference between .apply and .call [duplicate]

I find myself using jQuery objects with regular js objects often; I'm trying to figure out how I can utilize .call and .apply more often in my

How to Include Jquery function in a partial view in a modal

I have a jquery button click method which works fine in views other than modals.uploadbtn button click method doesn't work when partial view is loaded in the mo

how to use json file in html code

I have json file mydata.json, and in this file is some json-encoded data. I want obtain this data in file index.html and process this data in JavaScript. But a

Get current quarter in year with javascript

How can I get the current quarter we are in with javascript? I am trying to detect what quarter we are currently in, e.g. 2. EDIT And how can I count the numbe

Jquery Datepicker beforeShowDay not displaying tooltip and not assigning class in return

I'm trying to color the background of certain days in an embedded datepicker (not in an input field) and fire a tooltip on hover on those same colored days but

jQuery DataTables within jQuery UI Tabs

How do I adjust the jQuery DataTables columns within jQuery UI Tabs? This is my JS code: $('#myTab a').click(function (e) { e.preventDefault(); $(