jquery

Tying in .addClass() with other functions?

Assuming an accordion dropdown with the standard form of: <ul> <li> <a href="#">Main Element</a> <ul> <li> <a href="#">Dropdown Element</a> </li> </ul> </li> </ul> I'm using jQuery to expand when the parent element link is clicked: var $j = jQuery.noConflict(); function initMenus() { $j('ul.menu u...

jQuery Hover on <li>

Hi, I have a list of elements like <ol> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#">test</a></li> <li class="blah">some text <a href=#"...

ClearInterval() won't stop my rotate function

I'm using the jQuery Rotate plugin, to animate the rotation of an image 90 degrees, and then stop the rotation. My problem is that it won't stop rotating, even after calling clearInterval(); $(document).ready(function() { var finalAngle; var intval = setInterval(function func() { $("#myimg").rotate(1); if(type...

Enabling/disabling CascadingDropDown using jquery

Greeting; I have asp.net dropdownlist control with Ajax CascadingDropDown control. I also I have asp.net checkbox control. I want to enable/disable CascadingDropDown when the checkbox checked/unchecked using jquery. I tried diffrent ways but they did not work and if I want to set enable property for the dropdownlist to false it wil...

How to validate for save but not for delete?

Here is a snippet of my form <form action="" method="post" onsubmit="return verify()"> <input type="submit" name="submit" value="Delete" /> <input type="submit" name="submit" value="Save" /> </form> As you can see I am verifying with a function called verify(). I only want to verify if they click "save", I do not want ...

Data empty in jQuery.get() callback

$.get("http://localhost/test.php", (function(data){ alert(data); })) The alert is empty. I'm new to this, and I can't see what I'm doing wrong. Help? ...

jQuery access table inside a frame

Hi, I've got a problem. I want to select an element inside a frame (not iframe). The name of the frame is main, but I can't add an ID (complicated to explain, but not possible). How can I manipulate the data inside that frame? I already tried various different things (also from stackoverflow) but they didn't work... dodo frameset: <...

What is the best way to include jQuery in DotNetNuke 4.8.x?

I'm using DotNetNuke 4.8.x and want to utilize jQuery. Could anyone possibly suggest me on what is the best way to integrate jQuery into DNN? I won't be able to upgrade DNN version to 5 which has built-in support for jQuery. Your advice would be much appreciated. ...

How to prevent a click event using jQuery.live

When I use the following jquery live function $("a[rel]").live('click', function () { e.preventDefault(); alert('clicked'); }); e.preventDefault(); does not work, because the action behind the a tag is still fired. How do I prevent an event when I use jQuery.live? ...

how to reverse e.preventDefault() from the body?

I have this: function dontMove(event) { // Prevent page from elastic scrolling event.preventDefault(); } & <body ontouchmove="dontMove(event);"> This, on the ipad, stops it from being draggable and does not allow that grey background the ipad has when you drag a whole page around to show up. I have seen on another website ...

What are the Options for jQuery Animated Effects?

A lot of the jQuery (and jQuery UI) functionality allows for animations to occur when showing/hiding elements. One of the irksome things about their otherwise-thorough web site is their lack of definitions of the animation keywords you can use. I'm aware of slide, fadeIn, and fadeOut. I know I've used others in the past as well. Is there...

How can I hide or show a div based on if there is content in two textboxes using jQuery?

I have 2 textboxes on a page and they both have the class "OrderEntry". I want it so if there is any text in either of of these textboxes, it will show the div with ID "OrderPanel". If the textboxes are cleared, backspaced or empty, it will hide the div "OrderPanel". So, the page loads, "OrderPanel" is hidden and both "OrderEntry" tex...

Disabled button still clickable in IE8 with jQuery.live('click') event

Sigh I keep getting strange problems with IE 8. I have this <input name="Btn_Edit" disabled="disabled" id="Btn_Edit" type="button" value="Edit"/> $(function () { $('#Btn_Edit').live('click', function () { alert('hi'); }); }); So in every other browser this alert would never get trigger as my button is disa...

How to give a div tag focus when its contents are clicked using JQuery or CSS.

Is there a way to give a div tag focus when you click on its contents? Using CSS or JQuery? ...

What is "i" in "function(i)" in the following JavaScript?

In the following code there is "function(i)", but "i" hasn't been declared anywhere previous to this statement. ul.css({width: 10, overflow: 'visible'}).retarder(100, function(i){ i.css('visibility', 'visible').animate( {width: ul[0].wid,left:-50}, {duration: 500, complete : function(){ ul.css('overflow', 'visi...

Can I override jQuery .val() for only some input elements?

Suppose I'm using a "placeholder" jQuery plugin that reads the "placeholder" attribute from input elements and simulates it for browsers that don't yet support placeholders. But I would still like $("input").val() to work properly -- that is, to return "" if the text in the textbox is the placeholder text. Is there anyway I can overrid...

jQueryUI Accordian Menu - How to deal with items with no sub-menus

I've got a vertical menu using jQueryUI's Accordian method. The first two items have sub-menus and then the rest don't. I also have the event set to 'hover' instead of 'click'. The problem: is that when you hover over any of the items with no sub-menus, then it hides the one with a sub-menu. Is there a way I can make it so it always k...

flexible drag/drop with jquery (like this javascript)

I'm trying to understand how this drag/drop javascript example would be done in jquery. I'm guessing the jquery version will be cleaner, more efficient, and easier to understand. ...

jqgrid event when reload is finished?

I am using a jqgrid. I can see how many rows I have like this: $("#grid").getGridParam("records")); I can reload some different data like this: $('#grid').trigger("reloadGrid"); But once I trigger the reload how do I know when it is done loading and ready for me to see how many rows it has returned? ...

jQuery: how do I return true if any checkbox is selected in an array of checkboxes?

my checkboxs each look like this: <input id="bulk_selected_" name="bulk_selected[]" type="checkbox" value="159"> ...