jquery

jquery detect change in class assignment

Does anyone know a way to detect when a given element's class has changed using JQuery? I'm using the "simply countable" JQuery plug-in to notify the user of the number of characters entered into a text area. When the user exceeds the allowed number of characters, I would like to disable the "post" button. Since simply countable chang...

jquery tooltips: append/remove vs. show/hide

I'm showing tooltips like this $(clickedElement).append('<span id="activeHelpTip" class="helpTip">Loading help...</span>'); $('#activeHelpTip').remove(); A colleague suggested that on page load I append ALL possible tooltips with visibility none, and show/hide them on demand. What's the difference? Who cares? Edit: Is it relevant t...

Crystal reports and AJAX in .Net 2.0

Hello, Has anyone attempted using JQuery dialog to display crystal reports in .Net 2.0? Also, the crystal report viewer is within an AJAX update panel. We are trying to implement that and having nightmarish issues with printing and exporting the reports. If I use full postbacks from the report viewer, it closes the JQuery dialog. If I u...

Joomla, jQuery modules conflicting

I have a custom jQuery accordion menu on my site in a module, when the mod is enabled it breaks my RokSlideshow module. I can't get them both to work at the same time. The site is http://www.fbcsheffield.org/2.0 Any help would be much appreciated! ...

"too much recursion" error with live handlers in jQuery 1.3.2

This question is similar to my last question about "too much recursion" errors in jQuery, but involving live handlers. I have one element within another. Both of them have custom event handlers with the same name. The outer element has a traditional handler and the inner element has a live handler. When I try to trigger the event on the ...

Code isn't compatible with IE?

$(document).ready(function() { var url = document.location.toString(); $('.tab').click(function() { if($(this).is(".active")) { return; } var classy = $(this).attr("class").split(" ").splice(-1); var innerhtml = $('.content.'+classy).text(); $('#holder').html(innerhtml); $('.tab').removeClass(...

Checking to see if a frame exists with jQuery

I have found I can do the following: if($('#notice', parent.frames['header'].document).length>0) { alert("It is here!"); } to check for an item in another frame. Is there a way to find out of the frame exists? Specifically I am looking to see if parent.frames['header'].document is there. Is there a reliable way of doing this? Updat...

How do I use jQuery to grow an HTML form?

I'm creating a simple web application with which a user may author a message with attached files. That "attach another file" link does not yet work. When clicked, it should add an additional table row and file input control to the form. <tr id="fileinput0"> <td>Attachments</td> <td> <input type="file" name="Attachme...

Difference between Client Callbacks and Ajax Page Methods - ASP.NET

Based on my understanding, both of them essentially do the same thing (lets us execute a server side method from JS). Are there any differences? Also, Ajax Page Methods can be implemented either using JQuery or using ScriptManager. Which one is preferred and why?? **BOUNTY: Adding a bounty to get clear explanation of the question. Tha...

jQuery post parameter to load

How do I pass the values of txtname and tel as variables to the .load??? $(document).ready(function(){ $("#add").click(function(){ $("#result").load("add.php", {name: #txtname}); }); }); The html: <p>Name:<input type="text" name="name" value="" id="txtname" /></p> <p>Telephone:<input type="text" name="tel" id="tel" va...

Can this JavaScript be optimized?

This JS will be executed on pages with a lot of fields. Can you see anyway to improve the speed of this code? If so, can you explain what you found? var _TextInputs = null; function GetTextInputs() { if (_TextInputs == null) { _TextInputs = jq('input[type=text]'); } return _TextInputs; } var _Spans = null; func...

jquery validation rules.

My phone validation depends on a checkbox (no, don't contact me via phone). If this is checked, then I will not need run the phone validation. I googled around and found 'depends' function. I have $("#myForm").validate({ .... rules: { phone1: { required: { depends: "!#pri_noPhone:checked" }, number: true, minlength:3,...

variable declaration in ajax

Hi I need to write an ajax function to reload the content in a div of my Free marker tool page the Div contains a question with yes or no radio buttons and when the user picks yes and click the submit button the page should reload and as I am very new to ajax I wrote something like this PLEASE LET ME KNOW IF THE FORMAT I WROTE IN CREAT...

Simple jQuery test using "toggle" function, not behaving as expected

I've constructed a simple test with jQuery to see if I can get an element to show/hide upon the clicking of a button. HTML file: <link href="test.css" rel="stylesheet" type="text/css" /> <script src="jquery.js" type="text/javascript"></script> <script src="test.js" type="text/javascript"></script> <input type="submit" id="show" val...

Javascript / JQuery: refresh tab in parent

Hello, I have a (parent) window containing JQuery tabs: <div id="tabs"> <ul class="tabHeader"> <li><a href="?ctrl=doSomething" title="#tabs-something"> Awesome function</a></li> <li><a href="?ctrl=showSettings" title="#tabs-showSettings"> Settings</a></li> </ul>...

How can I use jquery for drag/drop

I have a drag and drop script using an older version of jquery which relied on Interface.js which was what people used for drag and drop before jqueryUI was ever created. I really need to convert/re-write my cript to use the newer versions of jquery though and the syntax is different now and it will not work with the older interface.js ...

limit number of jquery drag and drop id's

I have the code below that makes a list of div's drag and droppable, on drop it returns a list of the id's in there new order. I need to add 2 features to this code somehow. 1) In a dropdown select list there will be 5 options. 3,6,9,12,15 and when a user picks one of these numbers I need to highlight the first X number of the div's....

Generated html code is not click-able

Help me please i'm a newbie in ajax and framework jQuery , i make in jQuery a page , with different plugins a page , but when i receive html code from ajax ,and is not click-able , i used a function live() , but only helped on plugin delete , with edit plugin is not working , what can be the problem... This is script for editing <...

Appending an element with an event handler to a set of elements

Consider the javascript / jQuery code: jQuery("<input/>").attr("type", "button").attr("value", "Click me") .click(function() { alert("hello"); }) .appendTo(".someDiv"); This creates a button, binds an event handler to it and appends it to all elements with class "someDiv". This works as expected ONLY if ...

Change background of X amount of cells in jquery

I need to make the form select box change the background color of the list item cells on the list below it for the number that is selected from the dropdown box. So if a user selects 6 from the dropdown then the first 6 UL list items should change there background so they appear to be selected. When the dropdown list is changed, it s...