jquery

Is there a way round numbers into a friendly format? (e.g. $1.1k)

Much like the Stackoverlow reputation rounding, I'm hoping to do the same thing with currency $1,000 => 1k $1,000,000 => 1m Is there a library out there already that does this? (preferably in jQuery) ...

Javascript performance issue

Hello, I've built a top menu based on superfish, but the amount of displayed items in the menu is huge. And there is also alot of jquery on the top menu. Now to the problem, everytime I load any page that has the menu, the browser(ie7) feels like it looks it locks it self for about 1-2 seconds while the page is being loaded. I'm sure t...

Correctly calling setGridWidth on a jqGrid inside a jQueryUI Dialog

I have a jQueryUI dialog (#locDialog) which has a jqGrid ($grid) inside it. When the Dialog opens (initially, but it gets called whenever it opens), I want the $grid to resize to the size of the $locDialog. When I do this initially, I get scrollbars inside the grid (not inside the dialog). If I debug the code, I see the width of the $...

jQuery autocomplete disabled makes autocomplete partially transparent, not disabled

I'm using the jQuery UI's "autocomplete" function on a search on my site. When you change a radio button from 'area search" to "name search" I want it to disable the autocomplete, and re-enable it when you switch back. However, when you disable the autocomplete it doesn't hide the dropdown, it just dims it to 20% opacity or so. Here's my...

jQuery cycle plugin

how can I set multiple timeout? pls help me... timeout:'1000, 2000, 3000' this is not working. ...

jQuery .animate chains, callbacks, and .stop(true, true)

So I have a animation chain (.animate().animate().animate()), and on the last .animate(), there is a callback to do some clean-up. The animation is triggered by the hash in the address changing (#page1, #page2, etc.) -- so when the user changes the history state rapidly, if there is a currently executing animation, it needs to stop so t...

Image jQuery scroller in a container. (like facebook cropper) can't get values of position.

Hey all. Having a reallllll mind pain. I have a php image uploader which is all good and sotring the file and the jquery ajax is returning the image in an ammended html div with a div set up like this: #crop-holder { width:80px; height:80px; margin:10px 10px 20px 10px; border:1px #c0c0c0 solid; overflow:hidden; cursor:mov...

Using key().id() on GAE Datastore and reverse geocoding

I have 6000 data of district, subdistrict. I need to represent this on dependent dropdown. The datamodel is for example; class Location(db.Model): location_name = db.StringProperty() //location_parent = db.IntegerProperty() location_parent = db.ReferenceProperty() // location_parent is reference to key() or id()? Still can...

JQuery - How do I count the number of elements selected by a selector?

I am using $().fadeOut() to fade items out in a list ( < li> < /li>). When the list is empty I wish to hide a parent object. I plan on doing this by checking in my trigger event that fades the list if the count of the objects is 0 then hide the parent element. I can use the fadeOut callback to remove the elements if necessary. The to t...

add new option to dropdownlist after jquery dialog and post

I have a form to enter subcontracts. On this form I have a dropdownlist of all companies in the system. Next to it is a button "Create Company". This button opens a jquery dialog which allows the user to create a new company. Once the dialog closes, the new company needs to be added to the dropdownlist and selected. If I refresh, it...

Use jQuery to retrieve single value from another domain

I'm doing some work for a charity that's having a fund drive. Whenever someone makes a pledge, their pledge amount is logged to SQL Server. They'd like to have the pledge total posted across a couple of other websites, so I thought, "a-ha! this is an opportune time to learn about web services!" I assumed I could set up a web service th...

Jquery - Validating Email

I do NOT want to use the Jquery attachment to the field. I just want a function I can call and pass in a value and get back a result on if it is a valid email. JQuery documentation seems to indicate this is possible but the documentation falls short on examples outside of attaching it to the field. I realize I can use third-party functi...

How to get width of a div in pixels using JQuery (IE)

Hello there. At first glance it sounds easy... when using JQuery one can use the .width() method to retrieve the width of an element. The problem comes when the DIV element does not have its size in pixels but in words like 'auto' or 'inherit'. When I do this it works nice in Firefox and Chrome even if the size is specified in words: ...

Is there a way to get the end value of an animation in jQuery?

I have a script that animates an element as follows: var item_height = $('#item').height(); $('#item').height(0); $('#item').animate({ height: item_height }); Now suppose the animation needs to be stopped before it is complete: $('#item').stop(); How can I get the end value of the animation? (The total height of the element when t...

zopim chatting service like div required

if you look at this http://blog.zopim.com/ site, you will see on the bottom side a chatting service,, i actually dont want the chatting service,, i just want the div to be up on the top of all the stuff present at my site.. just like this one.. how can i have that,,, if any samples please share it.. it wud be quite helpful.. thanks......

TinyMce - automatically setting a template

I am using jQuery version of TinyMce with enabled template plugin. Is there a way to apply a template automatically without having to click on template button and choosing one. Thanks. ...

Can't get ajax - loaded image's height and width via jquery.

I'm loading an image exteranlly via ajax like so... function load_image(image_href) { var img = new Image(); $(img).load(function () { $(this).hide(); $('#a_box').append(this); $(this).fadeIn(); }, gallery_image_load_complete() ).error(function () { }).attr('src', image_href); } function gal...

jQuery drag and drop behavior with partially transparent image

I'm trying to develop a drag-and-drop behavior based on the jQuery UI draggable behavior but am running into some road blocks. I want to be able to drag several images with transparent regions around a region of the screen. I want the user to be able to drag the image he clicks and not just whatever draggable div or PNG happens to be z-i...

How to make this jQuery snippet work in Internet Explorer?

If there was ever a time to hate IE, this is it. This code begins with a box with content. When the button is clicked, the box is supposed to drop down and fade-in. <html> <script type="text/javascript" src="jquery.js"></script> <script type='text/javascript'> function Test() { var item_height = $('#test').height(); $('#test').heig...

How does the same origin policy apply to IP addresses

I have a server on our company intranet that runs JBoss. I want to send API calls to this server from my machine, also on the intranet, and get the resulting XML responses using JQuery. I read the entry on Wikipedia but am confused how that applies to my situation, since our machines only have IP addresses, not domain names. I have ...