jquery

jQuery Selectors and Filtering

Hi all: I'm just getting going with jQuery and am pretty excited about it. My reason for posting is that I've written some jQuery that does it's required task, but I'm suspecting that it lacks a little in elegance... I'm trying to grab all table rows that have: 1) a class of 'item' 2) a child text input box that has a value The HTML...

Events not registering after replaceWith

When I replaceWith an element to bring one out of the DOM, then replaceWith it back in, events registered to it do not fire. I need to events to remain intact. Here's my Javascript: var replacement = $(document.createElement('span')); var original = $(this).replaceWith(replacement); replacement .css('background-color', 'green') ...

callback function doesn't work when using getJSON function in jQuery

I am trying to use the getJSON function in jQuery to import some data and trigger a callback function. The callback function doesn't run. However, if I try the same thing with the get function, it works fine. Strangely, it works with the get function even when I pass "json" as the type. Why is this happening? I tested the following file ...

JQuery Treeview not working with Ajax

I'm new to JQuery and web development in general. I'm trying to load some data from an XML file and build an unordered list. I've got that part working, now I'm trying to use the TreeView plugin so I can collapse/expand the data. The data is loaded like this: $(document).ready(function(){ $.ajax({ type: "GET", url: "...

jQuery: $(document).ready() too slow in IE.

What would be the preferred way of hiding an element before the page is rendered? $(document).ready() works just fine for firefox, but sometimes (connection to the server seems to be a major issue in this) it lags a little behind in internet explorer; the element is shown, and hidden shortly after wards. That is: the page is rendered be...

DOM properties/methods that aren't available in jQuery?

Following up on my question about jQuery.get() I was wondering if there is a list of DOM properties and methods that aren't available in jQuery that can only be accessible if you were working with the raw DOM object (i.e. $("#someID").get().scrollHeight; ) ...

INVALID_NODE_TYPE_ERR in jQuery when doing multiple selectors on Chrome

I'm doing a jQuery multiple selector find: element.find("fieldset, input[type=hidden], input[type=text], :radio") and in Chrome version 1 it gives this error "INVALID_NODE_TYPE_ERR: DOM Range Exception 2" on line 722 of jquery's selector.js aRange.selectNode(a); in context: function(a, b) { var aRange = a.ownerDocument.create...

image swap technique - to fade instead

Hey, I am using this code below to swap on image on hover: $(function() { $("#compost").hover(function() { origImage=$(this).attr("src"); $(this).attr("src", "images/order-compost-over.gif") },function() { $(this).attr("src", origImage) }); }); Ia m trying to use fadeIn instead of a swap. I tried working it in but no luck.I t...

How do you get jQuery intellisense working if you've implemented a Url Helper extension to get the URL of your script files?

I have implemented the Url Helper extensions that Kazi Manzur has suggested in his MVC best practices guide here My Url Helper extension method to get a script file: public const string ScriptDir = "~/Assets/Scripts"; public static string Script(this UrlHelper helper, string fileName) { return helper.Content(string.Format("{0}/{1}"...

JSONP Callbacks in Adobe Air

I am having trouble figuring out a way to get some data back from a url in adobe air. It seems that there are security restrictions in air such that doing a normal callback will not work. So something like: $.getJSON( requestURL, function(json) { $('#response').append("working"); } ...

Creating XML document in jQuery environment

Have referred to JQuery docs where they mention this piece of code. var xmlDocument = [create xml document]; $.ajax({ url: "page.php", processData: false, data: xmlDocument, success: handleResponse }); but i am trying to make the same request in Adobe AIR environment its giving a parse error. Is there any specific way of crea...

JQuery and ASP.NET AJAX differences in MVC

Hi Looking at the new ASP.NET MVC framework it comes with javascript files for both ASP.NET AJAX and JQuery. Can someone explain what ASP.NET AJAX gives me that JQuery doesn't? Do I need to use both and can you give me examples where I would/would not need to use both? I've used JQuery on plenty of non ASP.NET projects (PHP and proto...

Periodically, partially update aspx page using jquery

Hi, I want to use only jquery to update a method which is reading account information periodically from database every 60 minutes. I do not want to refresh or load the whole aspx page while I’m refreshing only that portion of the page. Is there any way for accomplish this task? Thank you in advance ...

Zend From Decorators not working with ZendX_JQuery_Form

I am using two decorator - To get tabular form alignment - To get date picker (ZendX_JQuery_Form_Element_DatePicker) both are working individually, but not at a same time Error: Warning: Exception caught by form: Cannot render jQuery form element without at least one decorator implementing the 'ZendX_JQuery_Form_Decorator_UiWidgetEl...

How to disable reload when a tab is created dynamically?

Hi All I use jQuery dynamically create tabs, but each time I click one tab, it will reload the target URL again. How should I disable the reload behavior unless I want it reloads again? thanks a lot. ...

Stopping form submit during onlick of an input type="image"

The reset action is performed by input type="image" and onclick calls a function called resetForm(). When reset is clicked the form submit shouldnt happen.Tried returnin false from resetForm() function and still it doesnt work. Please help me out.. ...

jQuery loop through data() object

Is it possible to loop through a data() object? Suppose this is my code: $('#mydiv').data('bar','lorem'); $('#mydiv').data('foo','ipsum'); $('#mydiv').data('cam','dolores'); How do I loop through this? Can each() be used for this? ...

jQuery UI Dialog + ASP.NET textboxes + focus

Problem I am using jQuery UI dialog to show a dialog box with some ASP.NET textboxes and a button in it. However as jQuery moves the div for the dialog box outside the form I need to re-move it back to the form myself (see this for details why), so that ASP.NET still works. This moving is causing a problem, where the field does not get ...

Adding data to jqgrid subgrid when using clientSide data type

Is it possible to add data to a subgrid when the data type for the parent jqgrid is of type clientSide? I am able to add a row to the parent jqgrid using: jQuery("#myId").addRowData(0, someRowData); But i'm not to sure how I would add data to the subgrid. Any ideas? ...

How to learn AJAX using jQuery in a Java web app

Can someone point me to tutorials using jQuery to create AJAX apps with Java (servlets). I was looking at the tutorial Implementing Ajax in Java web application using JQuery, which is similar to what I need, but it doesn't include most of the detail. If you know of a good tutorial, text + graphics or video or know the main steps and can...