jquery

jQuery reset dialog on cancel and close before form posting

I have code that opens a dialog, validates, and posts a form when the validation is successful. If the user clicks "Cancel," the dialog should reset until the next time it's called. If the user clicks "OK," the dialog should close and the form should post, so if I hit the back button the dialog doesn't appear on the page. Code is as f...

Jquery: plugin to handle clicks on elements ?

are there any good plugins to handle clicks based on the element clicked ? for example, if link is clicked display a box with options. if form is clicked display a box with different options. or any pattern suggestion would be useful. ...

How do I hide my 'loading' image if the following script returns an error?

Hi there I am integrating the mailchimp API and just wanted to make it a little more user friendly by displaying a loading animator while it submitted the data. I've got it displaying the animator and on success, it hides the div with the animation. The problem is however if the script returns an error such as the email being incorrect...

jquery, using API event issue, delegate, live event.

Hello everybody, I have a question what I try to understand for a wile. When I am using API feed with jquery I always have a problem, it is "click", "ready" ... events, which makes me to apply some hacks or to choose another way. For example Flickr API: $.each(data.photoset.photo, function(i, rPhoto){ var basePhotoURL =...

Problem on JSON date Parsing

Hi All, I have a JSON source that sends its data that I display on my web page. Problem is, the Date part that it is returning is some sort of a javascript object. Please look at the sample response. dteInstallDate date 16 day 4 hours 0 minutes 0 month 8 nanos 0 seconds 0 time 1284566400000 timezoneOffset -4...

What is a good way to trace javascript execution as it happens (but skip jQuery)?

I want to step through a javascript as it happens, but skipping the steps where the functions are in jQuery. Is there any way this can be done? ...

Jquery + jqueryui - focusing on text field not working for FF

I'm trying to select a text field inside the tab, when the tab is clicked. The jqueryui event is correctly bound - have tested by putting alerts & by replacing focus() in the below code with hide(). But when I say focus(), it does not focus inside the text field. This is for FF 3.6.10 Code as below - $( "#tabs" ).bind( "tabsselect", f...

jQuery and piroBox don't like <!DOCTYPE html>

I'm trying to use the piroBox (http://www.pirolab.it/pirobox/index.php) jQuery plug-in to make a gallery. I'm also using <!DOCTYPE html>. With this DOCTYPE, the images that are supposed to appear in a modal dialog appear at the bottom of the page. Removing the DOCTYPE makes it perform as expected. Is there any way to make the plug-in an...

JavaScript filtering an array of <input> values by character count

This should be a quickie, but I'm scratching my head as to why this bit of JavaScript isn't working for me. The goal is to take the value of an input box (string of words separated by spaces), list these words as items in an array, and remove those which are fewer than 3 characters: var typed = $('input').val(); var query = typed.split(...

Can I sort between separate lists using JQuery sortables with each list only accepting items that meet certain conditions.

I'd like to use JQuery sortables to sort items between different lists. I have a master list of items with certain properties. Red Apple, Red Car, Blue Sky, Blue Berry etc. And I have the grouping lists RED BOX & BLUE BOX. RED BOX list should only accept red items and BLUE BOX list should only accept blue items. From what I can see, t...

What are some things to consider when letting other sites use scripts directly from your site?

I have a jQuery function that runs through the page, finds links to a certain domain, does an ajax call to get some data and crafts a tooltip when the visitor hovers their mouse over the link. Just like wowhead.com/tooltips. What are some things to consider when allowing other sites to include your script files, linked directly from you...

How to validate the text box should take only A B C

Hello friends.. I have a text box I need to validate that.. I mean user can only Enter Either A or B or C if he enters D to Z or any other things I should show the Popup message please Enter A or B or C Using Jquery or javascript? thanks ...

jQuery focusOut except if

I simply want to hide a div, if a text box loses focus, unless, the user clicks in another certain div. If user clicks that particular div, then the focusout doesn't trigger the div.box being hidden. Below is code with my pseudocode commenting. Any ideas? textInput.focusout(function() { // So long you didn't click div.stop, then ...

jquery code to check page height not seem working correctly..

I have a lil piece of jqery code here: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> hasVBar=""; hasHBar=""; $(document).ready(function() { // Check if body height is higher than window height :) if ($(document).height() > $...

Why is JQuery adding a style to my appended list item?

I'm using JQuery to drag items from one list and drop them onto another. Once the item is dropped it is removed from its original list and appended to its destination list. I've used the code below and it seems to perform perfectly fine when inspecting the DOM, however it displays incorrectly on the page. Usually outside of the list an...

JQuery stops working after an AJAX call (ASP.NET MVC)

Hi guys i know this is a known problem in ASP.NET MVC, basically what i have here is a photo gallery with categories (Red, Blue, Green). When i choose one category, say 'Red', it will do an ajax call and load the page with photos of red colored products. when i click one of the photos, i expect it to be enlarged (lightbox kinda effect)....

can I use blur in a hidden field, jquery

can I use blur in a hidden field in jquery? if not, how can I track changes in a hidden field ...

Get HTML code of Filled form using jQuery

I have a webpage with different controls. I have to get html source on button click for a particular div element's controls with values. jQuery .html() method gives me html source of controls without values, but I require html source with user selected values. ...

jQuery: making a commentbox like FB.

Hey. Facebook´s commentbox, how can that be done? So in a textarea there´s "comment..." and when you click it gets bigger, and a button appears, and then when you type more than the box size, the height of the box increases. How can this be done? ...

how can i check that at particular position there is a element present or not

how can i check that at particular position means particular x and y position there is a element present or not in jquery , javascript ...