jquery

jQuery autocomplete fires multiple times

So I have a jquery autocomplete on a testbox that searches the database for a user, and places the ID in a hidden input field. For some reason the autocomplete fires when they type something, then again when an item is selected, changing the text. Since I'm searching first and last name it doesn't find any matches the second time and c...

adding property to eventObject in FullCalendar

I use the json events property of FullCalendar to call a php script which returns a JSON string. The string has the required properties plus some extras like 'description'. The documenation says that you can add properties but there is no information on how to do it. I looked to see if it gets added automatically by looking at 'even...

Validate captcha using jquery validation

How can we validate captcha using jquery validation. avoiding post back using ajax? Can anyone please help me on this. Your help would be appreciated. Thank you. ...

Send uploadify submit/post to aspx code behind method instead of handler and close jQuery modal form

We're using Telerik's Sitefinity community edition and we've been having a fun time deploying handlers and webservices with it. As such, I'm wondering if when using Uploadify instead of the script option heading to an ashx could we post it to a server side method that can take care of the uploading? If so, would someone please be very k...

Jumping a week or month in the jQuery UI Datepicker

PetersenDidIt did a great job answering this question. He showed how to use a link to update the jQueryUI Datepicker's selected date by one day. His solution was: $('a#next').click(function () { var $picker = $("#datepicker"); var date=new Date($picker.datepicker('getDate')); date.setDate(date.getDate()+1); $picker.datepicker('setDate'...

Drop-down submenus overlap, how do I fix this?

I rendered this menu with Superfish and the Supersubs plugin: As you can see, the submenu that originates from parent "Long long long submenu item" isn't positioned correctly. I know what I need to do, but not how to execute it. First, I need to know the width of the parent menu. I then need to set the submenu's left attribute to tha...

Is there a way to preload TinyMCE?

TinyMCE is a big plugin to load at first. In nations with low bandwidth it takes minutes to load. So I am planning on preloading the tinyMCE so that the users dont have to wait for this to load. Any Idea? ...

Jquery Draggable and Stack and sec. CLass?

Hi all, I have a little problem with the Jqueri UI Stack $('.dra').draggable({ addClasses: false, containment: 'window', zIndex: '9999', stack: '.sta'}); The problem is that all DIVs with the class .dra are with stack. But i only want all div with the class .dra and with the second class .sta with stack. or must i say $('.dra .sta'...

jQuery: Executing code for each element that matches a selector

$("p") references all paragraphs on the current web page. Is it possible to execute code for each element that matched the selector? Here's a simplistic example in pseudo-code: // Show the background color of every paragraph on the page foreach (object = $("p")) { alert(object.css("background-color")); } ...

How to repeat or loop this queue on jQuery?

Hi, This is code for a faded slideshow. Is there a way to repeat or loop this queue? To start again on this top code $("#page2_image").hide(); Here's the code in jQuery: $(document).ready(function(){ $("#page2_image").hide(); $("#page3_image").hide(); $("#page1_image").fadeOut(10000); $("#page2_image").fadeIn(10000).fadeOu...

How to illuminate a browser window/tab when something interesting happens in the page?

Possible Duplicate: Make Browser Window Blink in Task Bar Hello I want to notify that something interesting has happened in a web page which is in a browser window or a tab. Eg. In Gmail chat, if you are in a different tab/window and if some one pings you in the chat the tab glows and shows some description running. How to...

jQuery ui accordion with panel that contains scrolling content and a fixed header

I would like to have an accordion with a panel that has a fixed header with a date picker in it and scrollable content while the accordion has fillspace set to true. So the accordion panel called panel-hmmm should not scroll but the div inside called scrollable-content should. <div id="accordion-west"> <h3> <a href="#">hmmm<...

JavaScript - How to make a sliding image viewer?

Hello. Can anyone explain how to create a sliding image viewer using javascript or jquery? From the ones I've seen, it looks like all the images are side-by-side and then buttons move the images across depending on the width of that image. Which shows the next image. There's one of these image viewers here. I'm not after the scrollbar th...

jQuery incorrectly reports a width of zero

I'm trying to access the width of certain elements by using jQuery's .width() function, but sometimes the return value is 0 when I don't expect it. Is this a known issue? Does an element have to be visible for this to work, perhaps? If there are limitations, how can I work around them? ...

jQuery + CSS: switch to "loading".

I have the following set up: <div class="click red"></div> <div class="click green"></div> <div class="click blue"></div> and when "click" is clicked I want to add the class "load" to the div. I have managed this fine, but "red" "green" and "blue" all have a background image set so I need to remove that class. Now, I know how to do th...

JQGrid loading disables(grays out) JQuery UI tab

Hi, Hi I am currently using JQGrid inside a JQuery UI Tab. My problem is that when I call the render JQGrid it disables(Grayed out with diagonal stripes). <script type="text/javascript"> $(document).ready(function () { $("#divTimePeriod").tabs(); jQuery("#listTimePeriod").jqGrid({ url: '/TimePeriod/GetT...

How do you implement Javascript onfocus() and onblur() for a password field?

According to my title how to implement the onfocus and onblur to the password field? Default value is password (readable) and when we click the password field it will return to password format. Here an example, I don't want to see "●●●●●●●●" but "Password" instead <input type="password" name="password" value="password" onfocus="this.v...

Jquery addClass function fails in IE7 for td element

For the following HTML: <td class="width2 padLeft" id="loading_45">&nbsp;</td> the following JQuery: $('#loading_45').addClass('loading'); With the following css definition: td.loading { background-image:url("../images/icon_loading_circle.gif"); background-position:left center; background-repeat:no-repeat; height:...

How do you select the last visible element with jQuery?

Hello, I am using jQuery and I want to select the last visible element with some class e.g. 'target' how can I do that ? ...

Creating associative arrays in JavaScript

Using the following code: $credits.getCredits = function() { return $(this).find( 'tbody' ).children( 'tr' ).map(function(){ var $name = $(this).children(':first').html(); var $role = $(this).children(':nth-child(2)').html(); return { $role: $name }; }).get(); } Which looks through the elements of a cr...