jquery

How to zebra-stripe a GridView with jquery?

Suppose I have three gridviews on my asp.net page. How to select one GridView from those Gridviews in that ASP.NET page and Zebra-Stripe it using JQuery? ...

how do I add a parameter to an ajax call using jquery?

I want to be able to call a URL be either a standard HTTP GET, or an AJAX call. The server needs to handle the request slightly differently based on whether the request was an AJAX request or not. Using jQuery, I want to automatically add a parameter to all AJAX requests I make, so that the server can identify them, and without me havi...

Stop IE from loading dynamically included script twice

I am including some related content on misc. web pages by adding a <script> tag near the end of the <body> tag, which then loads other javascript files. The flow is a little convoluted, so I’ll try to explain it before asking my question: A browser loads a page with our <script> element near the end of the <body> element The src attrib...

Nested Set model in PHP/Javascript to work with MySQL

I am using a MySQL Nested Set approach to store the classification of the various products that are sold on the website. I am looking for a nice javascript library to help out with rendering the tree from the nested set approach. I also need a good javascript drag and drop script to re-arrange and update the MySQL table. Are there any g...

How do I show something after mouseover longer than 1 second with jQuery QTip

I want to display a QTIP (http://craigsworks.com/projects/qtip/) after my mouseover is longer then 1 second on a link. how is this possible? If im with the mouse over the element less then 1 second, nothing should happen. I have tried the below code, but my browser crashes: $(".Details").bind("mouseover", function() { t= setTimeout(...

jQuery - char counter doesn't work with paste event

I wrote a jQuery character counter, it works when I type, but not when text is pasted. The function is executed upon paste, but count doesn't change. I am not sure if val() function is correct or really in synch with DOM. Any ideas? counter = function() { $j("strong#status-field-char-counter").text($j("#Panel1messagesmessage").v...

jQuery getting value from a drop down selected

hi, traditionally we write var value = $("#drop-down-id").val(); to get the value. IN my case, some of the options contains multiple words with spaces like "Allow All","Internet Users" etc. What I am getting in VALUE is only "Allow" that is, jquery is trimming off words after the white space.. Is there any other way to solve this? ...

Better way to collect data on javascript compatibility

Is there a better way to collect data on how many visitors don't have js enabled. My idea was to add a hidden value at page load with js. If it works then js was successful. But looks like there's no way to actually read it back to know if it was successful unless I do some kind of a page reload, but now it gets complicated (I have to de...

jQuery IE8 - Firefox problem

Hello, I have a big problem with IE8 where I use the jQuery framework. What works on Firefox, it doesn't work as well in IE8. I am not even checking IE7 :). Basically, I have simple animations that show/hide div layers and also that move top/down - left/right some of the div layers. Nothing special, just adding some movement to the pa...

jquery draggable to sortable

I've created a sortable list and a draggable item to add new items. I have a remove button that I want to make visible when I add the new item from the draggable. How do I wire the events up? This is the element that gets dragged from the draggable to the sortable. <a id="btn" class="ContentItemSelect" > <span title="Remove...

Hidden Columns in jqGrid

Is there any way to hide a column in a jqGrid table, but have it show when the row is edited in the form editor modal dialog? ...

Nested jQuery tabs

Hi I'm new to jQuery (a couple of weeks). I'm trying to nest the jQueryUI tab control. It works fine until the nested tabs are in an external file then I get an exception thrown in the jQuery source. This seems to be a timing issue to a certain extent, because if I place alert boxes in the .ready function of the nested tabs it works. Ca...

My Own jQuery Accordion

Hey Guys, i have created the following Menu Structure: <div id="menu"> <ul> <li><a href="#">Main Item1</a></li> <li><a href="#">Main Item2</a></li> <li><a href="#">Main Item3</a> <ul> <li><a href="#">SubItem for MainItem3</a></li> <li><a href="#">2ndSub for MainItem3</a></li> </ul> </li> <li><a href="#">Main Item4</a> ...

Simple Modal issues - Multiples, Disappearing Content

I'm a jQuery newbie and have rigged Simple Modal to allow me to have more than one modal on a page by doing this in my script: $('input.basic, a.basic').click(function (e) { e.preventDefault(); $(this).next('.basicModalContent').modal(); }); here's my HTML: <a class="basic linkHeading" href="#">Link Heading</a> <...

Javascript substr(); limit by word not char

I would like to limit the substr by words and not chars. I am thinking regular expression and spaces but don't know how to pull it off. Scenario: Limit a paragraph of words to 200 words using javascript/jQuery. var $postBody = $postBody.substr(' ',200); This is great but splits words in half :) Thanks ahead of time! ...

getting an element id from a plain javascript call

This example is simplified a bit, but in my ASP.NET web page in my c#/jquery code I am using a right hand context menu that displays ‘rightMenu’ when a right mouse is clicked. $(document).ready(function() { $(".RH_signoffrow td").contextMenu({ menu: 'rightMenu' }, function(action, el, pos) { var mykey =...

HR tag stays hidden while containing div is shown with jquery

I have a hidden div which I reveal with the jquery fadein() method: $("#panel").fadeIn("slow"); and here's the html: <div id="panel" style="display:none;"> <hr/> <p>text</p> <button onclick="cancel()">cancel</button> </div> The text and the button within the panel is shown properly when the method is called but the hr stays h...

jqModal close, reopen issue

A Jquery Modal is called with two form elements. There is also an option to close the modal. One scenario is that the user would close the modal, and can come back to it. But when the user come back, the form elements do not work, and the modal just closes upon a click. $('#test').jqmAddClose('#test'); My assumption is that whe...

intercept carriage return in a textarea

How do you catch a carriage-return in a textarea and do a form post instead of a newline in the textarea? ...

Ordering elements by number in JQuery

Hi, how could I arrange the following div's by the value in the attribute amount with jquery? Thanks. <a href="#" id="id1" class="lTest" amount="12"> <div>abcd1</div> <a/> <a href="#" id="id2" class="lTest" amount="64"> <div>abcd2</div> <a/> <a href="#" id="id3" class="lTest" amount="32"> <div>abcd3</div> <a/> <a href="#"...