jquery

Using HTML5 file uploads with AJAX and jQuery

Admittedly, there are similar questions lying around on SO. But it seems none quite meet my requirements. Here is what I'm looking to do: Upload an entire form of data, one piece of which is a single file Work with Codeigniter's file upload library Up until here, all is well. The data gets in my database as I need it. Good good. But ...

jQuery Validate Plugin Add Class errorPlacement Error Label

Using the errorPlacement hook I am able to add a certain class to a certain error element. However once the form has attempted to submit the second time, it looses that class I added. See the following code for the example. http://www.jsfiddle.net/NU63P/1 How can I keep that additional class on the element through the entire life-cyc...

Is it possible to use jQuery to get the width of an element in percent or pixels, based on what the developer specified with CSS?

Hello, I'm writing a jQuery plugin and something I need to be able to do is determine the width of an element that the user specifies. The problem is that .width() or .css('width') will always report exact pixels, even if the developer has assigned it e.g. width:90% with CSS. Is there any way to have jQuery output the width of an eleme...

Jquery Image Animation from one location to another

Hi All , I want to do a simple image animation.Assume that there is small image of 100*100 pixel image at location A. I want to move the image from location A to location B and maximize the at location B. I have both the dimension images small and large. I don't want to increase the width and height of image itself. I have a separate ...

Last element in .each() set

Hi there, I have an issue, where by I am doing a simple form validation, that needs some custom stuff that the validation plugin could not do for me. Basically, I have a name, email and message field, all are required, but only email is really validated, the others just need to check if theyre not empty. Here is my current code: $("#c...

this jquery remove function?

i have a problem with this jquery, in the success function call, its mean to remove the `support' button, and fade in the msg, this is my jquery code: $('.stats').delegate('.against', 'click', function(e) { //stop event e.preventDefault(); // cache a reference to the previous <li> element // since it is use...

Jquery show and slideout animation doesn't fully work

I am totally confused - When I removed pretty much everything and put the offending code in JSFiddle, it works fine - http://jsfiddle.net/FusGB/ However, in the site, almost the same identical code does not work: http://ezpcinternal.com/sports/index.html (Menu to the left) What is happening is the first item is doing the effect, then t...

Build URL from Form Fields with Javascript or jquery

Hello, I have a quick question, I can't seem to find a suitable solution to anywhere else. I'm trying to create a URL builder form with Javascript or jquery. Bascially, it will take the value of the two form fields, add them to a preset url and show it on a third field on submit. The resulting URL might be http://www.mydomain.com/in...

NXE dashboard in HTML 5

Im looking for a NXE dashboard style template in HTML or CSS or javascript just not flash. For those of you who dont know what NXE is, its the xbox dashboard. any information on this please respond ASAP. thanks ...

Easy to understand and follow books on jQuery and javascript?

I would like to know your opinion of a good jQuery and JavaScript book. There are just too many of them [when I try to search]. Please suggest some really good books which I could buy. My current knowledge on these technologies - Close to Zero. Thanks in advance, Rahul ...

How do i trim in javascript or jQuery?

how do i trim using this $('#type_of_station').text() the result is >>> $('#type_of_station').text() "pizza delivery system " As you can see there is a space after the last word ...

jQuery fly out.

I wrote this jQuery script. It works somewhat OK. I want this fly out to close when the user mouse goes outside the fly out. How would I do that? Here is the code below: <script language="javascript"> $(document).ready(function() { $('#slick-box').hide(); $('a#slick-toggle').mouseover(function() { ...

execCommand justifycenter

If I try to execCommand("justifycenter"... a paragraph on my page in Firefox, it doesn't work; it's giving me this crazy error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: editor.p...

Does Javascript SetTimeOut Affect Page Performance?

I am writing an AJAX script that basically calls a PHP page and requests some information. The PHP page queries a database. I want to set the page to make the call every 5 minutes, but the only way I know how to do so is by using the settimeout function. I am wondering if this settimeout function is constantly running is this going to be...

Jquery: detect if middle or right mouse button is clicked, if so, do this:

Check out my jsfiddle demo, if e.which == 1 then when you left click the h2 it will e.which == 2 or e.which == 3 then it wont work. 2 is the middle mouse button, and 3 is the right mouse button. i found this too: JQuery provides an e.which attribute, returning 1, 2, 3 for left, middle, and right click respectively. So you could also us...

How to add a "preview" stripe to my site

I would like to add a "preview" stripe to a site. I like what blogger does when you click to preview editing a post (Anteprima means preview in italian) Do you know how to make it as a layer in order to plug it without modifying the main html code of my site? ...

how to change image inside <p> tag on mouse over through jquery

my code- <td> <p align="justify" id="prodetail"><img src="images/PostQuote.png" id="protext">Airspot recently realeases a revolutionary wireless router that can help your WiFi router go social.<br> <a href="linkpage.htm" align="right">more...</a></p> </td> I have some links on mouse over of links I am changing the ...

Using HTTP PUT to send JSON with Jquery and Rails 3

HTTP PUT isn't entirely cross browser so Rails (I'm using Rails 3) supports using POST and passing the _method query param. This is great, but it doesn't seem to work when sending JSON. Example: $.ajax({ url: window.location.pathname, type: 'POST', contentType: 'application/json', data: JSON.stringify({_method:'PUT', p...

jquery help for div having same prefix id

Hello, I have 4 DIV's with different ID's (but have same prefix (testDiv[1|2|3|4]) ) and i want to set their visblity(visible or hidden) on some event. How can i use to set the DIV visiblity property at one times something like $('testDiv*').css('visibility', 'visible'); OR $('testDiv*').css('visibility', 'hidden'); There is workar...

showing loading gif file while page gets loaded using jquery

hi guys, I am using JQuery. I am having below jquery which I am using to show the page fragment, it load the page fragment while the main page is loading. $(document).ready(function() { $(".load-fragment").each(function() { var $objThis = $(this); var fname = $objThis.attr("h...