jquery

jQuery new element appended to DOM does not work

I have a script that selects and drags several elements. It works fine but when I want to add another new element to that function, append it to DOM, it does not work. The function is: $(function() { var selected = $([]), offset = {top:0, left:0}; $("#selectable1").selectable(); $("#selectable1 span").draggable(...

JQuery select box focus problem in internet explorer

In the following ".input" matches with a tag. The code works fine in all browser except in internet explorer where I need to click on a select box twice to get the dropdown. $(".input").focus(function () { var rc = $(this).parents(".rc-input"); rc.removeClass("rc-input-default"); rc.addClass("rc-input-active"); }); If I use moused...

jQuery: selecting the first instance of an element that occurs after another specified element

Using this as a simplified example, assume I have a table that has some radio buttons in it followed by a div element with a link in it. This pattern is then repeated some unknown number of times like so: <table class="rdoBtnList"> <tbody> <tr> <td> Person 1 </td> <td> <label for="rb1">Verified...

jquery: can i animate the position:absolute to position:relative?

i have a bunch of images that are positioned absolutely, i want to be able to click a button and have them all animate to where they would normally be on the page if they had the position: relative. so is it even possible to animate from position:absolute to position:relative in jquery? this is what i have: $(".change_layout").click(f...

How can I set the contentType of a jQuery ajax post so that ASP.NET MVC can read it?

I have some jQuery that looks like this: $.ajax({ type: "POST", url: "/Customer/CancelSubscription/<%= Model.Customer.Id %>", contentType: "application/json", success: refreshTransactions, error: function(xhr, ajaxOptions, thrownError) { alert("Failed to cancel subscription! Message:" + xhr.statusText);...

Why isn't this .change event firing in jQuery?

<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>System Toolbox</title> <script src="../../Scripts/jquery-1.3.2.js" type="text/javascript" /> <script type="text/javascript"> $document.ready(function() { $("#SearchFor").change(function() { alert($(this).val());...

JQuery Plugins Not Working Correctly With ASP.NET AJAX's ScriptManager

I am trying to use a jQuery plugin in a control. The pages that the control can be on use partial postbacks via an UpdatePanel. I include jQuery and the plugin during the control's PreRender event like this: ScriptManager.RegisterClientScriptInclude( this, this.GetType(), "jquery", "/_infrastructure/javascript/jquery.js"...

problem with Jquery equivalent to javascript createElement

Hello, I'm trying to recreate the following code with jQuery: var node = document.createElement("div"); node.innerHTML = "DynaColumn"; node.className = "ui-state-default ui-corner-all"; return node; this is the code I'm trying to get to work: return $("<div class='ui-state-default ui-corner-all'>DynaC...

Accessing dynamically created elements from inside of a repeater.

I need to create a series of dynamically created buttons inside of a repeater. These buttons names are coming from a database. When a user clicks a button, some hidden text beside the name appears. And disappears when clicked again. The text will have to be either defined in the html or the code behind. Here is some code to demonstrat...

How to view the size of the packets sent with IE8 developers tool?

Hi there, I am used to use Firefox's FireBug and It is really good. I can see all the info I need. Right now I am dealing with an application that is only compatible with IE, I am using the developer tools of IE but it is not as intuitive as Firebug and I can't figure out how to see the size of the packets sent from the client to the se...

Jquery, "$.each(", function returns error in IE. 'Length' is null or not an object

My code is working fine in FireFox but my users are restricted to IE. I'm getting an error though in IE, related to my JQUERY function. populateTable:function(returnList) { var self = this; var eat = $.evalJSON(returnList.firstChild.textContent) $.each(eat,function() { $("<tr><td>" + this.reportId + "</td><td>" + ...

Swap 2 html-select with animation (JQuery)

Hi all! I am a new in JQuery, but i think it can solve my problem :) I have one html-select over the another one. And when I click on the bottom select I would like this select will go up, and change place with the top "brother". This operation can be with animation (it will look more user friendly). Can you help me or maybe you know ...

Loading alternative content via tabs and jQuery and JSP

Hi. I have a table of data for a policy type (options are Single, Couple, Family & Single Parent Family). I want to have a tabbed interface with each policy type occupying one tab. At the same time a table of data relating to relevant policy type is displayed beneath the associated tab. When a user clicks on another tab then a diffe...

jquery ajax call errors in chrome onenter with no responseText

I've built a login page that uses a .ajax call to a generic c# handler (.ashx) to validate the username and password before allowing the user to log in. If you click on the login link <a href="#" class="ui-state-default ui-corner-all CustomButton" onclick="goLogin();return false"> the .ajax call returns successfully and it logs the u...

use php array in javascript?

my php code looks like this: $result['firstName']['lastName']='johan'; echo json_encode($result); how should i type to use this array in javascript with jquery? ...function(data) { alert(data.firstName.lastName); }); or ...function(data) { alert(data.firstName['lastName']); }); ...

difference between extension and plugin?

what is the actual difference between a extension and plugin? eg. is phplivex a extension or plugin? i have to know in which folder i should put it in ...

When do browsers start to render partially transmitted HTML?

I have a long-running report and want to show a wait-spinner to the user while it's generating. I have made this work already but am not sure I'm doing it the best or right way. This is using ColdFusion but it could be any language I guess. At the top of the page, I have some Javascript (jQuery) that shows a wait-spinner plus there's a ...

When loading an html page via ajax, will script tags be loaded?

When you load an html document using AJAX, what does it do with the nodes inside the HEAD tag: (script,link,style,meta,title) ignore them or load and parse them? And in the case of jquery 's ajax() function? ...

jQuery/js dealing with 'double focus' with cursor and event

I'm enabling keyboard navigation for a menu. I'm running into an issue in a particular situation: <ul> <li><a href="" class="link1">link</a></li> <li><a href="" class="link2">link</a></li> <li><a href="" class="link3">link</a></li> </ul> the jQuery: $('ul').keypress(function (eh){ var keyPressed = eh.keyCode; if (...

Adding optgroups to select using javascript dynamically

Hello! I have a dynamically populated (by ajax) select box with resulting options like that: <select id="destination" name="destination"> <option value="london-paris">London-Paris</option> <option value="paris-london">Paris-London</option> <option value="london-newyork">London-New-York</option> <option value="newyork-london">New-York-...