jquery

jQuery .load() does not load plug-ins

I have a main page with 2 links that load external files via .load(). The first file has a simple JavaScript rollover, which works when the content is loaded. The second file has a jQuery plug-in that does not work when loaded via .load() - but works fine when the data file is viewed by itself. Main file: http://gator1105.hostgator.com/...

Explain this fragment of jQuery to me

I am newbie to jQuery, can someone explain what this code does: $(document).ready(function() { var order = null; $("#order-list").load(location.href+" #order-list>*",""); $("#order-list").sortable({ handle : '.handle', update : function (e, ui) { order = $(this).sortable('serialize'); $("...

Is this non minified version of jQuery up on Google?

During development, I use this to load the latest jQuery: <script src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("jquery", "1"); </script> But during development, I'd like to use the non-minified version. ...

Setting Focus to a link using class name with Jquery

Using jQuery I am trying to set focus for (CSS purposes) to a particular link from a list of related links on the load of the page based upon the class name. Example, of the following I want to set focus to Link1 <a href="#Link1" class="nav-button-left">Link1</a> <a href="#Link2" class="nav-button">Link2</a> <a href="#Link3" class="nav...

jQuery select only tr in main table, not nested tables.

I currently have a table with a nested table in it: <table class="datagrid" id="report"> <thead> <tr> <th>item1</th> <th>item2</th> </tr> </thead> <tbody> <tr class="odd"> <-- on click from this level only <td></td> <td></td> </tr> <tr>...

jQuery tabs error when used with jTemplates

I am using jTemplates to format data returned from a json query. I am trying to transform the div with the id "fundingDialogTabs" into jQuery tabs after the template is processed. It renders the tab buttons, but both fragment1 and fragment2 divs are showing at the same time. I get the error "jQuery UI Tabs: Mismatching fragment identifie...

animate div width styled as table-cell

I've created 2 columns. The 2nd is 240px wide and the 1st takes all available width. The below displays fine in IE8 & FF3.6: /*My Styles*/ div.table { display:table; border-collapse: collapse; table-layout:fixed; width:100%; border-spacing:0; padding:0; margin:0;} div.cell { display:table-cell; overflow:hidden;vertical-align:top;} <...

Ordering of jQuery binding to elements?

Hi, I'm having a bit of a difficulty using jQuery to bind a function to an element. Basically I have a set of divs that I load using JSON. Each of the JSON items have an associated "action" that defines what function to call if that div is clicked. As I iterate through each of the JSON items, I do (editied for clarity): for (var i = 0...

the Javascript "function pageLoad()" doesn't play nice with UpdatePanel...

So I've got this UpdatePanel. Inside it I have a nifty little jQuery scroll gallery of thumbnails which shows the full image in a container after posting back to get the full image URL from the server. Each thumbnail in the scroll gallery is an imageButton with an onCommand event. What's happening is that when a thumbnail is clicked it ...

Xml Calling with jQuery, (invalid XML)

Hi All, I have one problem , I want to get some data from XML file (if I can say that it is XML file), with jQuery: This is my jQuery, it works with normal XML file : $.ajax({ type: "GET", url: "test.xml", dataType: "xml", success: function(xml) { $(xml).find('result').each(function(){ ...

What side effects does the keyword 'new' have in JavaScript?

I'm working on a plug-in for jQuery and I'm getting this JSLint error: Problem at line 80 character 45: Do not use 'new' for side effects. (new jQuery.fasterTrim(this, options)); I haven't had much luck finding info on this JSLint error or on any side effects that new might have. I've tried Googling for "Do not use 'new' for side ef...

jQuery replace image source problem in IE

In the DOM I am loading a static Google Map image. When the document is ready with jQuery sometimes I need to replace that image with a bigger version. Problem is that in IE the CPU goes whooooooo because IE is still looking to load the initial image with no success. Is there a way to cancel or clear the previous load? EDIT: I should no...

jQuery flicker after UpdatePanel refresh

Hello, I am using jQuery with ASP.Net. I have some content which needs jquery to be applied to it inside of an update panel. So, I just put it in a regular script tag to discover that the script doesn't get called on postbacks. So I put it in pageLoad to find a large amount of flicker, so I now I have it in regular script blocks and page...

jQuery inconsistency in setting readonly attribute in IE-8 and FF-3.5.8

This is my code inside document.ready: var $inputs = mySelectors(); $inputs.each(function() { $(this).attr("readonly", "true"); }); This code works for IE8, but not for FF3.5 IE output(as seen with IE Developer toolbar)<input type="text" readOnly="readonly"..../> FF output (seen with Firebug) <input type="text" readonly=""> What i...

Returning data from wikipedia using Ajax?

Is there a service or api that allows wikipedia data regarding a string be retrieved only with javascript? ...

Toggle tables upon selection

I have a select element with a few options. Depending on what is selected, I would like to toggle the display for inherited data. <select> <option>Option "A"</option> <option>Option "B"</option> </select> <table> <tr><th>TABLE A SELECT</th></tr> </table> <table> <tr><th>TABLE B SELECT</th></tr> </table> option ...

Keep tooltip inside browser window? (without using plugins)

My tool tip code is as follows: HTML/CSS a.tooltip span { display: none; padding: 5px; border: 1px solid #000; background: #999; position: absolute; color: #fff; text-align: left; } <a href="#" class="tooltip">[Help]<span>This is the tooltip</span></a> jQuery: $('a.tooltip').hover( function(...

How do I get to cousin elements with JQuery?

I have a table with many rows of data, and I want to show or hide some of the details on each row based on a checkbox in the first element. For example: <table> <tr> <td><span class="aspnetweirdness"><input type=checkbox></span></td> <td>Text Text Text</td> <td><select /></td> <td><input type=text></td> </tr> </tabl...

openrasta xml request being returned as json

I have a very simple OpenRasta app with a Home resource with a single string property of Title (straight from the OpenRasta community doc example). I've set up both XML and JSON data contracts for the resource like this: ResourceSpace.Has.ResourcesOfType<Home>() .AtUri("/home") .HandledBy<HomeHandler>() .AsXmlDataContract(...

Jquery External Link Help

I'm fairly new to jquery and haven't had much time to explore more and was wondering if anyone could help me. Here is the code I have which I pulled from different places: $("a").filter(function() { return this.hostname && this.hostname !== location.hostname; }) ...