jquery

Html5 audio / jQuery : playback latency issue (preload).

I am working with html5 audio and running into some troubles with the buffer. This works splendidly in Chrome, however in Safari (and SafMob) there is noticeable latency. The idea is simple. A user clicks an img link and the img "jumps" and makes a sound. Here is an example. Is there a way to preload the sound file so that it plays quic...

Variable height div with custom background-image - what is the best technique?

I'd like to produce something like the 4 boxes at the bottom of the apple.com home page, except I would like them to be variable height. The simplest techniques I can think of is having two divs. The first one containing everything except the bottom 'cap' in its background-image, and the second div with the bottom cap, like so: <div cl...

jQuery version of Dojo's Stateful?

Does anyone know of any plugins written in jQuery that are similar to Dojo's Stateful? See: http://www.dojotoolkit.org/api/dojo/Stateful.html Regards, Scott D Brooks ...

Inserting spans and classes around characters in a string of raw text

I have a string of raw text which looks something like this: 1 . . 3 . 4 . | A . A . N . | 1 . 1 . . . I sadly cannot access the source code, but need to add a span with a class to each of those characters, so that the outputted HTML would look something like this: <span class="1">1</span> . . <span class="3">3</span> . <span class...

Good jQuery Plugin for a Form Field Initial or Default Value?

What is a good jQuery plugin for a showing default value in an input box that disappears when it gets focus or a user starts entering text? ...

Best jquery script for Full Page/content Sliding Horizontally ...

Does anyone know any jquery script examples to show a full page/content website that scrolls horizontally using scrollTo and easing? ...

html form button vs input type="submit" vs this.submit()?

What is the proper standards compliant semantic way to have a submit button on a form? I don't need images or backgrounds in the buttons, just simple text, maybe a gradient background with curved corners (using CSS3). These are the ways I know of: <input type="submit" value="click here"/> <button>click here</button> <span class="but...

When POSTing via AJAX / jQuery, one big request or a lot of little ones?

Alright I'm going to create a fairly complex form to post via AJAX a lot of different types of information PHP page which will then parse the data and CURL the various datatypes into the correct tables in another database. Usually I just send a HUGE POST request and then parse the information in the PHP page, making multiple CURL reques...

jQuery select input name inside an iFrame?

Hey guys, I know about the same origin policy, however I wonder if this is possible: I'm having an iframe with an src from another website on my site. Inside of the iframe is input button with name="sendButton", I wonder if i can use jQuery to select this sendButton and on the onClick an alert should pop up. Is this possible? Same ori...

json data returns invalid label error

I'm using Ajax file upload function with its javascript / jQuery library. When uploading a file, I keep getting this error message: SyntaxError: invalid label This is my JS script: jQuery('.uploadImage').live('click',function() { ajaxFileUpload(); }); (...) function ajaxFileUpload(){ jQuery.ajaxFileUpload({ ...

Problems executing an XMLHttpRequest from file:// to http://

I'm trying to do an XMLHttpRequest from a local file (file://) using JQuery.ajax to something on http:// and from what I can see it looks like the request is going out (the success callback is called and Firebug shows the request) but there is simply no response coming back. Here's basically what I'm doing: $.ajax({ url: "http://st...

Make an event happen in child iframe to the parent window in JavaScript?

I don't have access to this iframe's source directly, so I would like to do this, if it's possibly this way. I have an iframe generated by JS: <iframe name="temp_iframe" width="100%" height="95%" src="'+the_url+'"></iframe> And inside is a submit button and a cancel button. The submit button works fine, but I want the cancel button t...

Cross Domain Policy iFrame - inspecting for elements?

just curious if it's possible to inspect an iFrame with src set to some other website for it's elements? for instance checking with jQuery if the iFrame contains a <div class="hello"> is that possible? thank you for your help ...

remove check boxes with certain values

I have the following snippet of code of which I do not have access to the markup to add id's/classes. What I need to do is remove any checkboxes that have certain values. There are 10 or so values that if any of the checkboxes have these values they need to be removed from the markup. In addition to that I also need to remove its associ...

accessing the jquery function after success call?

jQuery(function ($) { /* fetch elements and stop form event */ $("form.follow-form").submit(function (e) { /* stop event */ e.preventDefault(); /* "on request" */ $(this).find('i').addClass('active'); /* send ajax request */ $.post('listen.php', { followID: $(this).find('input').val()...

How do I prevent a scroll bar from displaying in jqGrid?

I'm using a jqGrid and a horizontal scrollbar appears. How can I stop this from happening? ...

Serialize complex form to JSON object using jQuery.

I've been searching for hours for this and haven't found an answer. Please read through the whole question before flaming! :) I have a form similar to this: <form id="sample"> <input name="name" type="text" value="name value" /> <input name="phone[0][type]" type="text" value="cell" /> <input name="phone[0][number]" type="text" valu...

Trouble sorting JSON object

I have a JSON object collection: var Gallery = [ { "Order": 1, "Page": 1, "LargeImage": "large.jpg", "ThumbImage": "thumb.jpg" }, { "Order": 2, "Page": 1, "LargeImage": "large2.jpg", "ThumbImage": "thumb2.jpg" }]; I want to each over this object but after the collection is sorted on "Order". What is the best way to do this? ...

Drew Wilson's autocomplete help!

I used Drew Wilson's autocomplete, its really well made but poorly documented. I am able to initialize the autocomplete plugin, but i cannot get the values selected. I tried using this: $("#txtReceipient").autoSuggest(data.items, { minChars: 2, matchCase: false, selectedItemPr...

Form Builder with JQuery Validation

Im looking for a really good form builder like http://jotform.com but one that uses JQuery for validation. The things I like is the really easy drag and drop and the speed at which forms can be created and then I can grab the code and put it on a site. Jotform uses Prototype and it conflicts with JQuery. Is there one avaliable? ...