Category "jquery"

JQuery issue "TypeError: $.getJSON is not a function"

I've got this piece of code: $(document).ready(function () { $.getJSON('http://localhost:5000/', function (response) { console.log(response); }

How to make bootstrap-multiselect invisible my default?

I am using the bootstrap-multiselect plugin to make dealing with drop down menu easier. However, I am having an issue when trying to make the menu hidden by def

Detecting new line while typing in a textarea [duplicate]

When i am typing in a text area, how can i detect whether the current word i am typing is the first word in the newline. I just want to find w

Is there any built in function in javascript/jquery to filter email like php's function (!filter_var($variablePassed, FILTER_VALIDATE_EMAIL))

// check if e-mail address is well-formed if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Invalid email format"; } This code is filtering

print number from 1 to 10 after every 2 seconds

i want to print number after every n number of seconds and based on few conditions i am changing the timer as well as i am stopping the print function. i have d

Open a new window using data from input form

In a input form in a HTML file, the user is supposed to put an URL (let's call it thislink). Then I want, when the user clicks on the submit button, to open a n

Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node

I am having an issue with Javascript. I'm getting this error message: Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before wh

How can I create a Download Page with post php method?

I want to know that how can I create a download page in PHP that download files without reveling the download link to the file, and source to the file and downl

$(document).ready does not work in Rails

I'm using a *.js.erb in my Rails-App, which reacts to a clicked Link. But when I render my page, by getting there via a link_to, I have to refresh the Page, to

How to play sound through HTML buttons

My current method of playing music through my website is by the HTML audio tags. However I want to be able to play it through HTML button instead. This button s

How change nameMonths of fullcalendar to Spanish or any language

I hope somebody could answer, is kind of silly question probably... I would like to change the values of monthnames, monthNamesShort. I found I can change the v

Open Div from Left to Right onClick

I have HTML like: a#clickme{width:20px; height:20px; background:#444; cursor:pointer;display:block; text-indent:-9999px} div.mydiv{width:200px; height:200px;bor

Knockout enable binding not working

I can't get the enable binding to work in Knockout JS. With the enabled property set to false, the button is not disabled and I can still click it. see fiddle

Click button copy to clipboard

How do I copy the text inside a div to the clipboard? I have a div and need to add a link which will add the text to the clipboard. Is there a solution for this

Javascript control data flow by JSON

I have a web application makes in JQuery + KnockOut that reads all data in a JSon format from a web service. The data are reloaded and reparse every seconds wit

How to display validation errors when WTForms is coupled with Jquery Form Plugin?

I am trying to combine WTForms with jQuery Form Plugin. With the latter, I bind a form and provide a callback function. On the other hand, WTForms has to do th

Confirm Leave on External Links in Wordpress

Here's the situation: This is a bank website, so when a user clicks an external link (perhaps to a Facebook page or a partner website), there needs to be a box

Replace null values to empty values in a JSON OBJECT

Hi I've got a JSON object provided by an ajax request. Some of the values inside the json appears as null, but I want an empty String instead My sample of cod

Send same name multiple checkbox values via ajax

I have multiple checkbox input elements. <input type="checkbox" name="userpages[]" id="1" value="1"/> <input type="checkbox" name="userpages[]" id="2

Using more than one bootstrap-datepicker in one page

On my website i need to set 'from-date' and 'to-date'.For this I have 2 text boxes. I used 2 bootstrap date-pickers for the same.Date-pickers are actually worki