Mustache.js - display key instead of value

Javascript
I am using this data here: http://pastie.org/3231052 - How can I display the key instead of the value using Mustache or Handlebars? [{"interval":"201...
3 years ago

compare two date using javascript

Javascript
I have two date in which one is dd-mm-yyyy hh:mm format and another in dd-mm-yyyy (D1)format fristly i split the dd-mm-yyyy hh:mm format date to get ...
3 years ago

Auto-size dynamic text to fill fixed size container

Javascript
I need to display user entered text into a fixed size div. What i want is for the font size to be automatically adjusted so that the text fills the b...
3 years ago

How do you show just the first line of text of a div and expand on click?

Javascript
I want to show just the first line of a block of wrapped text, and then reveal the whole block on click. Also, I'd like to know how to toggle it back ...
3 years ago

DataTable JQuery | Reinitialize and getting the column & row

Javascript
I have a data table in my page with the status column and view details column. after clicking view details it will pop up a modal, the modal contains ...
3 years ago

Ternary Conditions in React Components className

Javascript
I am pulling data from a json file and trying to add a class only when a specific condition is met: render: function() { var gameList = this....
3 years ago

Javascript function stored in array vs in a variable

Javascript
In this example why does pushing the function reference onto the array not change the scope of this whereas assigning the function reference to a new ...
3 years ago

QUnit, Sinon.js - How do I ensure Post to Fake Server has correct request body?

Javascript
I have a JavaScript function that does a Post to a remote API that I am looking at writing a unit test for. The method I want to test is this: var fu...
3 years ago

jQuery UI dialog not appearing Squarespace adblock detect

Javascript
I have created an AdBlock detector, and my jQuery dialog does not seem to be working. Note: the "adblock" variable is already referenced. Also, I am u...
3 years ago

How can I throttle stack of api requests?

Javascript
I have an array of ids, and I want to make an api request for each id, but I want to control how many requests are made per second, or better still, h...
3 years ago

Create a random background color in Wordpress

Javascript
I've checked out all the related questions I could find and still cannot get this to work so am reaching out to you lovely folk! I wish my site to ha...
3 years ago

Find child of div with particular text

Javascript
I have a box, a div, and inside there are three children, displayed as three different words... --------- | Red | Green | Blue -------- Anyways,...
3 years ago

How can I display my detail after choosing in autocomplete textbox using jquery - MVC 5 Razor

Javascript
How can I display my detail (Full name and Department) after choosing an Employee ID. I am using MVC5 and Razor In this image shows my main form The...
3 years ago

How to create a jQuery plugin with methods?

Javascript
I'm trying to write a jQuery plugin that will provide additional functions/methods to the object that calls it. All the tutorials I read online (have ...
3 years ago

jQuery datepicker prev and next buttons not showing, how to point at theme folder images in css

Javascript
I have used the jQuery ui datepicker to successfully add a calendar control to my textbox, but the previous and next buttons are not visible although ...
3 years ago

Fancybox enlarge same image onlick

Javascript
In content area of the page i have to place few images and when user click on the image it enlarges the image using fancybox. If image is large then ...
3 years ago

What is the appropriate selector for :not $(this)

Javascript
The above yellow link does not provide a solutions to this. The correct answer is .siblings() which is not in any of the linked solutions I am trying...
3 years ago

How do I add a class to a given element?

Javascript
I have a element that already has a class: <div class="someclass"> <img ... id="image1" name="image1" /> </div> Now I want to...
3 years ago

How to make minimum two inputs of a form required in JavaScript?

Javascript
I have a form with 3 inputs of type text. I need on submit of that form to make a validation with required fields. I need the user to complete only tw...
3 years ago

How to check if a string is a valid hex color representation?

Javascript
For example: AA33FF = valid hex color Z34FF9 = invalid hex color (has Z in it) AA33FF11 = invalid hex color (has extra characters) ...
3 years ago