jquery

Using JQuery how to show and hide different div's onClick event

I would like to show a div based on the Onclick event of an link. First Click - Show div1 Second Click - Hide remaining div's and Show div2 Third Click - Hide remaining div's and show div3 Fourth Click - Hide remaining div's and show div1 => repeat the loop and goes on.. Code Follows: <div class="toggle_button"> <a href...

Jquery - Stop clicking before the document is ready

Hello, I want to stop click on any links until the page is loaded. Can you help me how to do this? Thanks. ...

Show and hide divs at a specific time interval using jQuery

I would like to show divs at a specific interval (10 seconds) and show next div and as go on and repeat the same. ** Sequence : ** On 10th second show div1 , hide other divs , After 5seconds interval Show div 2 and hide other divs, After 5 seconds interval Show div 3 and hide other divs, and repeat the same for every 10 secon...

Javascript: Validating dynamically created radio button list control in ASP.NET

I have an ASPX page where in the page load i am dynamically creating some radio button list controls and rendering to browser.I will have 2 list items in each radio button list .One is Yes and second is No. The number of Radio buttonlist can be n.Now in my java script code, i want to know which radio button is clicked . I m already using...

advantage of $.each method over for..in loops?

Various JavaScript libraries (e.g. jQuery) offer an each method: $.each(myObj, myFunc); What's the advantage over using the built-in for..in loop: for(var i in myObj) { myFunc(i, myObj[i]); } In both cases I'd have to check for unwanted properties (usually functions), so I don't see why the each method is provided in the first ...

Javascript best practice: handling Firebug-specific code

Firebug is certainly a wonderful tool for javascript debugging; I use console.log() extensively. I wanted to know if I can leave the Firebug-specific code in production. What's the best practice? Commenting the debug code? ...

i need drag n drop in jquery?

Hello, I'v bean searching for a such plugin and I think found it http://batiste.dosimple.ch/blog/posts/2008-05-18-1/jquery-drag-and-drop-and-resize-event-delegation.html but the problem is .. how can I define events? .. when the object gets dropped or re-sized I call a function that print all changes in some like name:div1; top:10;...

jquery: getting elements from xml in different order

Hello, The xml response from the ajax request looks like this: <element type='type1' /> <element type='type2' /> ... <element type='type1' /> I want to insert dom elements based on the xml, but I want them to be ordered as: first all the elements of type1, then all the elements of type2. It made sense for me (and I also read some di...

When calling a Javascript function, how do I set a custom value of "this"?

I'm using jQuery and I have a function that serves as an event callback, and so in that function "this" represents the object that that captured the event. However, there's an instance where I want to call the function explicitly from another function - how do I set what "this" will equal within the function in this case? For example: ...

How to structure HTML form elements so they can be easily translated into a PHP object?

I am trying to figure out the best way to name my HTML form fields so that they can be easily parsed into a set of PHP opbjects. For example I have the following table of elements: (let's assume it is inside a form) <table> <tr id='payment0'> <td><input type='text' name='paymentType0'></td> <td><input type='text' name='paymen...

Highlighting active elements with jQuery

So I have an unordered list that I would like to have jQuery highlight the active link on that list. I have animations on the list for mouseenter and mouseleave which increases the font size when the a link is hovered. I can get the links to stay at their increased size and color by using .unbind on the mouseleave, but when I try to re-...

JQuery FullCalendar 1.1 plugin - does it support event modification?

Does anyone know if the current version of the JQuery FullCalendar plugin ver 1.1 support event add/delete/update? I need to load the calendar with events from the db in an asp.net mvc app, allow the user to add/change/delete events, then persist any changes back to the db. Is this doable? Thanks for any feedback! ...

jQuery selection: traversing up, then back down

I am struggling with how to select a particular element with jQuery. Conditions outlined here: At the relevant point in my function, this references a span. That span may be a child, grand child, or great grand child, but somewhere up the hierarchy, it's contained by a td. I'd like to select the last span inside of the td. The span may...

Mega Dropdown menu seen on sitepoint.

Im busy messing around with the mega menu example shown on sitepoint but noticed it uses a plugin to delay the hover. How do i adjust the Jquery so that i don't use the plugin. Sorry I can't figure it out my code so far $(document).ready(function() { function addsubmenu(){ $(this).addClass("hovering"); $(".hovering div").anim...

How is the jQuery slider implemented?

Does anybody know how the jQuery slider is implemented? Does it use the JavaScript canvas library to draw the two guiding lines or something else? Thanks! ...

bind jquery DatePicker after partial update in ASP.Net MVC

In my view I`m using an Ajax call to dynamically show a form to add a new entry to a list. After the entry has been added sucessfully the list will be shown again. However, in this form I have a textfield where the user needs to type in a date. What would I need to do to dynamically bind the jquery UI DatePicker to this field? ...

how to perform events when a checkbox is checked/unchecked in jquery

I have the following jquery code which works fine. $('#onlyTwo').click(function() { $("#textarea3").attr("disabled", true); $("#textarea4").attr("disabled", true); $("#radio3").attr("disabled", true); $("#radio4").attr("disabled", true); return true; ...

call URL inside get() method in jQuery

Ok. I have the following jQuery code jQuery(function(){ jQuery.get('/GalleryPage.aspx?gallery=1234', {}, function(data) { galleryXML = data; renderGallery(pageIndex); }, "xml"); }); As you can see, I have 1 URL ('/GalleryPage.aspx?gallery=147') which I display it in “GalleryView.html”. Now I want to show another URL/ID in the sa...

jQuery firefox issue with different servers

Hi. I'm developing a simple voting system for my site with jQuery. When I tested it on my local (own PC server), it all worked fine (on IE, Firefox and Chrome). When I uploaded to my main server, Firefox gave me an error. Considering that Firefox works fine on my local server, it has to do with the difference in servers... This is the ...

Change Enter Key using jQuery?

I use mutliple framesets on a page, and each frameset has an associated button to perform a server/client side postback. I wanted to change the default enter key to select the correct button and this was my soltuion using jQuery. $("#<%= SearchCustomers.ClientID %>").find(":input").click(function() { $(this).parents("FIELDSET").add...