jquery

How to call innerhtml after modifying it in firefox

Hi, I have below code in html <div id="divTest"> Hello <input type="text" id="txtID"/> <input type="text" id="txtID"/> </div> <input type="button" value="Click" /> and I am trying to modifiy innerhtml to get the value of all the controls in my form on runtime in firefox. please see the javascri...

Jquery Relace Part of String in Any Class

Hi, I am trying to reset a class for any links that have been previously selected by removing the end of a class name. When the link is clicked on the class is appended with "_selected" so that the image remains highlighted. When another link is clicked on, I am trying to remove "_selected" from any link that may have been selected pre...

jQuery Autocomplete Problem - Not treating Arrays correctly.

I am using jQuery Autocomplete and MVC to populate a dropdownlist with a bunch of column names. Whenever a user changes the value of a DropDownBox on my form I make a request to my controller to return a new list of columns (as an array, wrapped in a JSON Result) that will populate my AutoComplete boxes. My Problem is that the autoco...

how to load a page with jquery ui dialog

is that possible to load another page with jquery ui dialog ? Like Dialog + Ajax Thanks ...

Can I use a static (i.e., predetermined) callback function name when requesting JSONP with jQuery?

The jQuery documentation lists the following example of using $.getJSON to request JSONP: $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;format=json&amp;jsoncallback=?", function(data) { $.each(data.items, function(i,item) { $("<img/>").attr("src", item.media.m).appendTo("#imag...

How do I include an icon on a Stripes button with jQuery

I am using Stripes and jQuery along with a generated jQuery UI theme. I want to embed a <stripes:form> in a div, then style the <stripes:button> for the submit with one of the icons from the theme. This Works: (but obviously doesn't tie in to Stripes) <button id="save" class="ui-state-default ui-corner-all"> <span class="ui-icon u...

jQuery validation plugin, remote call

Hello, I am using jQuery's validation plugin to validate a username. Somehow my json request data is invalid and I dont know why. Here is the code: remote: { url: "blablabla", type: "POST", contentType: "application/json; charset=utf-8", dataType: "json", ...

JavaScript: Calculating a value from a CSS property in a <DIV> to another <DIV>

I'm a noob so this is probably basic stuff, but I have tried to solve this by searching the web without any luck. Any help is much appreciated! What I need to do is: To move a floating down X px after the page has been rendered, where X is the height of another . I have tested the CSS manually, adding X px to the "Top:" property and it...

Jquery remove form tag, not content

Hello i need to remove a form tag but non the content: <form id="form"> <div> not remove this only the form tag</div> </form> ...

JavaScript to Manipulate Copied Text

I copied come text from a The Huffington Post article and found that the web site had somehow snuck a citation onto my clipboard: The text I had selected. Blah. Blah. Blah. Read more at: http://www.huffingtonpost.com/... How did they do that? ...

jQuery hosted on Google CDN: why is Internet access still needed?

I am using jQuery from google CDN. I looked at the cache-control and it seems the browser should fully cache the jQuery version for a long time. However when I disable Internet access my webpages stop working. Why? Is it because even though jQuery is cached, the browser still needs to resolve DNS? ...

JQuery Contains Selector - Multiple Text Items

Hi, I am new to JQuery and maybe am missing the obvious, but how can I filter a table using the contains selector but have it look for multiple strings using an OR operator. In other words, I would like rows containing "Red" OR "Yellow" to be hidden. So far I have this which works by hiding all rows except the given date: $(function()...

Safari/Webkit jQuery UI sortable loses behavior when showing/hiding container elements

$(".someUl").sortable({ ... }).disableSelection(); $(".containerOfSomeUl").hide(); $(".someButton").click(function() { $(".containerOfSomeUl").show(); }); The above works fine in Firefox and IE, but not in Safari (but Chrome works). After I hide and later show the container, someUl loses all sortable behavior and does not work. I...

Binding multiple handlers to elements

Hey, I'm new to JavaScript so this is most probably going to sound really basic but here goes. My web page is made up of "modules" which I load into the page with jQuery, so that my JavaScript works with the new content that has been loaded into the page, I have been told to use callback functions. My problem is though, how do I activa...

Removing jQuery Validation on the fly.

I'm trying to prevent the jQuery Validation plugin from validating if a certain form option (phone only) is selected using $("#form_id").rules("remove", "required"); feature, but it's not working... All I get is a javascript error when I select phone only: "TypeError: Result of expression 'F' [undefined] is not an object, and the form w...

Easing With JQuery

Can't seem to get the easing function to work with my parallax. Trying to make the board move a little cleaner. Any help would be greatly appreciated. Sorry I'm new here and whenever I try to post my code it tells me I cannot have an image. I put it up on my host. http://cheapramen.com/JQuery/skate/moveit.html ...

How do you stretch a Background Image

I have a gradient background that I'm using like follows in an ASP.Net Webforms application: <div style="background-image: url(foo.jpg) repeat-x;"> ... Injected HTML codes </div> Where foo.jpg is a 200x1 pixel image. My problem is this, the height of the injected HTML varys from about 200px to 1000+px depending on size of a data...

Jquery UI TABS-3 : Prevent Switching (until ajaxcomplete/success) : How To?

I want to prevent tab switching until Ajax call is complete. Is there any way to achieve this? Right now (by default) the moment I click on another tab, it gets switched to that tab. I wanna prevent this until Ajax call is successful/complete. FYI: I'm using Jquery Tabs-3 plugin. Please help me out. ...

jQuery form submit: add element, then $.post problems

On form submit I want to serialize the form's elements, then stick another field on, then submit with $.post. Can't quite get it. The form's submit action looks like: data = $(this).serializeArray(); data.push({filter: $.toJSON(filter)}); $.post("/datawarehouse/new.php", data); return false; But it's just the form's fields and then u...

How to add click event to a iframe with JQuery

Hi all, I have an iframe on a page, coming from a 3rd party (an ad). I'd like to fire a click event when that iframe is clicked in (to record some in-house stats). Something like: $('#iframe_id').click(function() { //run function that records clicks }); ..based on HTML of: <iframe id="iframe_id" src="http://something.com"&gt;&lt...