jQuery is a cross-browser JavaScript library that facilitates DOM traversal, event handling, animation and AJAX interactions.

learn more… | top users | synonyms (3) | jquery jobs

0
votes
0answers
6 views

adding click event to body when input is focussed on, then removing it on blur

I have a text input that I would like to, when it has focus, register a click event anywhere on the body. But when focus is removed from it, that click event is removed from the body. Sadly, I seem ...
0
votes
0answers
5 views

Executing a function on initial page load (and user refreshes) but not back button

I'd like to execute a javascript/(or jQuery) initialization function -- let's call it myPageInit() after a page is fully loaded. Here's the catch: myPageInit() should run only when the page is ...
0
votes
0answers
5 views

How to access Struts 2 variables in jQuery

I'm trying to get access to a Struts 2 property via jQuery. My Common.js file looks like this: $(document).ready(function() { alert("<s:property value='myVariable'/>"); }); When I load ...
-1
votes
1answer
15 views

Show only weekend in jQuery datepicker plugin

I would like the user can only select Saturdays and Sundays in my jQuery datepicker. What should I add to my datepicker script?
0
votes
1answer
24 views

Get file name of file being uploaded and write it into a text field

I have a form with two input fields, one type=file and other type=text. I would like to: select a file with type=file field to be uploaded using php grab the file name of the file being uploaded ...
1
vote
0answers
24 views

Can I encode an array of 'array objects' in php when using json/ajax?

Hello I was wondering if this is possible? $results = $stmt->fetchAll(); $recent_posts = array(); foreach ($results as $row){ $post = array( 'username' => ...
0
votes
0answers
32 views

Adding countdown, using jquery. messes up the page. What am I doing wrong?

First of all, I have read jQuery: Can't append <script> element, After reading it, and utilizing what it said, I have reached a DIFFERENT problem: Yes, it showed me how to insert a script ...
0
votes
1answer
9 views

jQuery Toggle not working in IE8

I have an issue with jQuery toggle not working in IE 8. It works in all the other browsers as well as IE 9 and IE 10. I'm also using Bootstrap with it. Here's my sample code below. Can someone ...
1
vote
1answer
15 views

document.ready and appending dynamic form items

I have a problem with my javascript code (obviously why I am here) It's the first time I have asked for help with programming so please go easy on me. I have a script that gets loaded when the ...
0
votes
0answers
11 views

jQuery cycle plugin not working (using document ready breaks it)

The issue is that i cannot get the jQuery Cycle plugin working properly. Whenever i add the code below to the directly below the jquery.cycle.all.latest.js file it a) makes the screenshots move out ...
1
vote
1answer
19 views

register click on everything on body except div and all its children

I am trying to hide some li elements when any element on the page is clicked that isn't them or their container (div.dropdown_container). I can't seem to get it to work though. ...
0
votes
0answers
24 views

Radio button bind with textbox to localstorage or cookie not working properly

This script is adapted from one of the user here, however once I added in the checkbox bind with textbox, it doesnt work properly. E.g from http://jsfiddle.net/TzPW9/315/ once I click on 'others' ...
0
votes
0answers
15 views

jQueryMobile - Why is a new dynamically generated page not updated to the last version?

I'm generating pages dynamically in jQueryMobile, but I can't understand why the new generated page is not updated to the last version. This is the use case: Page A contains a list of 'a' elements. ...
2
votes
0answers
68 views

Check if element is visible in div

I have a div with many li's inside. <div> <li></li> <li></li> <li></li> <li></li> <li></li> ... </div> ...
1
vote
1answer
21 views

attach div after radio option based on ajax request

I'm using jquery to make a ajax request to determine if it should open a div when a specific radio button is clicked. I want the div that opens to appear directly under the radio button that is ...
0
votes
0answers
12 views

jQuery ajax jsonp calls error after success

I'm using jQuery 1.9.1 performing jsonp against the Etsy API. Below is a routine used to call into the API; it accepts a signed request (url), a jsonp callback name and an error handler. call: ...
0
votes
1answer
37 views

Tables jquery/javascript

I have two issues. I am trying to dynamically create tables when the "enter" button is pressed. function commandLine() { $('#write').bind('keypress', function (e) { if (e.keyCode == 13) ...
1
vote
3answers
33 views

How to return a value from $.each(…)?

To intercept a gazillion of close-votes, I can stress that it's not related to, let alone answered by, this thread. I'm not sure how to return a value from a $.each(...) construction to the outer ...
1
vote
1answer
25 views

My ajax JSON object is recognized as “Undefined”

I am having troubles with my ajax call. When I try to alert the result it keeps resulting as Undefined. Both alerts are resulting to undefined. I am not too sure if I am coding this correctly, please ...
0
votes
2answers
29 views

Inactive links until scroll

I'm having a strange HTML/JQuery problem. The top nav on my homepage has 5 links that are described in HTML. For some reason, the links do not 'activate' until I scroll the page. I am manipulating ...
0
votes
0answers
37 views

how to make ajax function wait until all result reveive for callback function

I am reading URLs of images from XML file in Ajax function with async set to false, so it should wait for Ajax function to complete. while receiving these URL, i am calling another function to ...
0
votes
0answers
12 views

google maps v3: how to drop markers, remove, loop again

I have been studying Google Maps and I would like to accomplish the following goal: 1) drop markers one by one; 2) delete last marker (so just one is in viewport) 3) drop next marker 4) Have info ...
0
votes
1answer
21 views

JQuery showing too many decimals

I have this code for a progress bar but the .progress-labelis showing too many decimals, something like (2.020302032400%). My code looks like this <script> $(document).ready(function() { ...
0
votes
3answers
24 views

jQuery click handler not firing for all elements

I need to create a number of buttons based on JSON returned from a php (in which I'm using MySQL to get that info from the database). The code below works by creating the buttons I need, but for some ...
0
votes
0answers
5 views

update exclude_ids facebook apprequests

I am using FB apprequests to make users send requests and I am using exclude_ids based on array from users invitations here is the code I am using $("a#invite_fb").click(function(){ ...
0
votes
0answers
12 views

jquery easyui datebox event to querying mysql

i use this script on jqery easyui datebox <script> function onSelect(date){ $('#result').text(date) } </script> and the output is Selected ...
0
votes
1answer
12 views

How to display elements in popup jQuery Mobile in one line?

I'm making this code using jQuery Mobile, and the buttons doesn't appear in the same line, any suggestions? please help, thx. CODE: <!DOCTYPE HTML> <html> <head> <script ...
0
votes
4answers
40 views

setTimeout passing arguments issue

I'm trying to pass an index of element and slideUp each list item content with delay here is my code for(var i = 1; i <= $("#colContainer li").length ; i++) { var el = ...
0
votes
1answer
28 views

Simple JQuery animate(); not working in ie 8?

I have been working on this snippet of jquery that works fine in chrome and firefox, ie 10, and ie 9, but ie 8 will not work. Where am I going wrong, the jquery written seems to be correct. What can I ...
2
votes
1answer
33 views

Passing a variable to target a specific array

Hopefully this is a simple question, but I can't seem to get to work. I'm trying to pass a variable to access a specific array and hide that array's contents. In this example $prodCat = labialWire. ...
1
vote
2answers
35 views

Backbone.js - Uncaught TypeError: cannot set property … of undefined [closed]

I keep getting the following errors in the Chrome dev tools console: However, I can't seem to figure out what's wrong the collections.js file. Any suggestions? index.jade //- HTML here... //- JS ...
0
votes
2answers
22 views

Variables in function expressions

the last few days i red a lot about the difference of function expression and declarations in javascript. Most of the time it said that function expression are the preferred way to create functions in ...
1
vote
0answers
18 views

Chrome and local JavaScript files

I have a code like this: http://codepad.org/0j9m2Xdw These files: <link href="js/jtable/themes/metro/blue/jtable.min.css" rel="stylesheet" type="text/css" /> <script ...
0
votes
2answers
28 views

What to do when jQuery isn't working?

I am running a WordPress website. jQuery 1.8.3 is loaded from the wp-includes directory. I wrote the most basic of jQuery code... http://learn.jquery.com/about-jquery/how-jquery-works/ <script ...
2
votes
4answers
31 views

addClass vs attr and creating an ID

So what I am reading is that when adding a class to an element without any class selectors, use the addClass() method over attr(). For example, using: .addClass('myclass') is more efficient than ...
0
votes
2answers
23 views

Show/hide content using jquery in multiple DIVs

I have a single page with, say 5 posts, all in the #article. Following is the jQuery code used to toggle hide/show: $(".click-show-more").click(function () { ...
0
votes
0answers
14 views

Jquery Datatable - display issue

I'm using aaData array datasource , while displaying the value into table it only one character is appearing.May be this simple question , but its looks hard to me..Please help me. data value format ...
-1
votes
0answers
17 views

How to get Gravatar name in jQuery

Is it possible to get the Gravatar Name in a simple way using jQuery. I can already get the profile picture, but I want to get the name now.
1
vote
1answer
20 views

Opening a modal from a modal in bootstrap

I guys! I'm trying to open a modal inside of a modal and I found this fiddle that works fine but when I try to put in the html it does not work. I have: jquery 1.9.1 bootstrap-modal.js ...
0
votes
1answer
29 views

jquery loading external javacript

I'm trying to get a jquery script to load in an external javascript file based on if a cookie which I created exists.... and it's doing weird things... it is either blanking the entire page and ONLY ...
2
votes
2answers
20 views

Need to push all JSON into an array from AJAX, in jQuery

Here's the code: var newFeeds = []; // ** GLOBAL ** $(document.body).click(function() { $.ajax({ type: "POST", url: "http://mysite.com/feed.php", success: ...
0
votes
1answer
17 views

Twitter app delay tweets

For a long time I've been trying to learn how to program an app of twitter like facebook, except in php. However, I cannot find any tutorial or lesson on how to start doing this. As an example, I ...
2
votes
2answers
36 views

how to make div toggle onclick, child div(s) have no id's

How would I write Javascript/jQuery that hides a particular div onclick and makes the other divs visible. For example, clicking on div:1 would make div:1 invisible and div:2 and div:3 visible if they ...
4
votes
4answers
63 views

AJAX is not calling PHP?

Can anyone please point out exactly what I am doing wrong, I am trying to make a php call when a selected value is changed. The code is not echoing the information from the php file. JQUERY CODE // ...
0
votes
2answers
25 views

jquery blur not working on “exiting” text input even though “click” does

I'm trying to make a custom dropdown be able to be "tabbed into" using jquery. That is, it is made of a ul, and I want the text input directly above it, when tabbed out of give some sort of focus to ...
0
votes
1answer
16 views

Safari Scrolling issue with jQuery .remove()

I'm developing a plugin for a website building program, and am building the preview page for it. It's sort of a parallax scrolling plugin and the issue I'm having is that in Safari, when you scroll ...
1
vote
2answers
26 views

recognizing actions on an iframe

So I have an iframe, and I would like to be able to do something like an alert whenever a specific button in the iframe is clicked. But the following code does not work ...
0
votes
2answers
20 views

Trying to use jQuery to horizontally distribute elements of different sizes in a <div>

I'm trying to use jQuery to space these elements apart equally. As you can see, I'm totaling up the widths of the objects and subtracting by the width of the surrounding DIV to find the empty space. ...
11
votes
4answers
93 views

Why is one number valid json?

$.parseJSON("1") returns 1. I would expect this to throw an error because this dose not seem like valid JSON of the form: { "firstName": "John" } Why does 1 parse correctly? Is there anyway ...
1
vote
3answers
21 views

Showing a Google map with a button click

I've tried to put together a single script which shows a google map when the button click and then reads the coordinates from two input fields. This is the code I have written: ...

1 2 3 4 5 6556