jquery

jquery .load() not replacing content on Firefox

I'm using a simple line of jquery to load a new "song meaning" when a link is clicked. This works fine on Chrome and IE, but it doesn't change in Firefox. I'm passing the song ID with the 'sid' variable so that the loadmeaning.php knows what song we're looking for. $('#songmeaning').load('/music/ajax/loadmeaning.php', "sid="+id); I t...

Problem parsing xml with jquery

I'm trying to parse xml from SharePoint service (lists) using jquery. I have XMLHttpRequest object xData which contains responseXML property, which is IXMLDOMDocument2. xData.responseText has following value: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http...

weird jQuery dataTables rendering issue

Hi all, I'm working on a web app that uses menus (fg.menu) and jQuery UI tabs. These work great. I'm now trying to apply the dataTables plugin to the tables that I'm loading (via Ajax) in my tabs. The tables are generated on the server side (JSON is not an option right now) and sit in static files that I load into the tabs. The tables h...

jQuery / AJAX - response format

Hi I was wondering what's the best "format" for the data that gets sent back to the javascript to be in? When should I use a JSON string or just plain HTML? Are there any other options besides these two? ...

How do I add transition effects to table rows with jQuery

The following jQuery code swaps table rows when some buttons are clicked. I would like to know how to add a transition effect so that there's a fade-in or fade-out transition effect when a row is moved (instead of the change happening instantaneously). I'm not sure where or how to apply the transition! // Move item to top or up/down by ...

drop initialize in portlet jquery ui

Hello im using jquery ui potlet and i need the portles be initialized dropper. Now when the pages load portles collapse is on mode. Thanks. ...

How to make jQuery .click function more scaleable

I am having a little trouble getting this to work. I have several anchor tags on a page that use scrollTop for its animation. HTML example link <a id="TOS" href="#Svc">What are your terms of service?</a> and the target <div class="tabWrapp" name="TOS" id="Svc"> <!-- /tos tabWrapp --></div> and the jquery $('a#TOS').bind('click',f...

How can I zebra stripe a gridview that uses jquery tablesorter?

I have an asp.net GridView that I use the tablesorter on: $(document).ready(function() { $("[id$='_myGridView']").tablesorter({ sortList: [[0, 0]] }); }); How can I apply zebra striping that re-stripes when re-sorting? Edit: As @Chetan Sastry pointed out, it's as simple as: $(document).ready(function() { $("[id$='_...

Jquery to capture value and pass the value to a hidden field

Hi! I wrote a script that changes text based on user selection, which is working fine. I am not sure how using Jquery to capture the user selected selection and pass the value below to the hidden field ie replace the value="100" with the user selected value example value="trade"? -thanks JQUERY $(document).ready(function() { ...

Problem with year dropdown scrollbar in jQuery datepicker

I'm using a jQuery datepicker to select an applicant's date of birth, but the applicant's age must be restricted to values between 21 and 100 years. In order to make the selection relatively easy I have turned on the month and year dropdown boxes, and being in the UK I have localised it. <script type="text/javascript"> $(function () {...

Appending Iframe to Particular Place in HTML Using Jquery

Hi all, I'm trying to place the following DOM generated iframe into a certain part of the page. In particular I want it to sit inside a div I have name "maps". Right now it's floating all the way to the bottom of the page probably because it's being placed there. Is there a way to find the div called maps and place it right after that di...

IE8 is returning NULL when selecting from jQuery + AJAX request

I have no idea why this is happening. First off, the code is valid via W3C validator as HTML5 EXCEPT for URL encoding issues (like & should be & amp;) but i don't have control over that and that shouldn't cause this error anyways. Second, this works in all other browsers. Third, the "data" element you'll see in the JS below returns the...

jQuery .wrap issue

How would I go about using the jQuery .wrap method to wrap a span around text in an element? Here is the code I am working with so far: $.each(childElements, function(i, val) { $(childElements[i]).wrap("<span class='' id='child_element_" + i + "' />"); }); I want to wrap that span around the text that is in my chi...

jQuery iteration question (confused by example in a book)

I'm working my way through the O'Reilly jQuery Cookbook. On p. 100 there is an example where I don't get one detail. I'm in my first week of looking at jQuery, so that's no surprise, but I'm hoping someone can clarify. The function is a toggle with a few bells & whistles: onValue and offValue are both Booleans, and must have opposite ...

jQuery: Removing HTML-element while keeping it's children

Hi, I want to add HTML like this: <div><img src="item.png"/>&nbsp;<a href="#"><span>Hello</span></a></div> but in some cases I need to get rid of the wrapping a-element, so it looks like this: <div><img src="item.png"/>&nbsp;<span>Hello</span></div> This a-element could be anywhere in arbitrary HTML-fragments. I grab it by a[href=...

Show or hide content based on the date with jQuery?

I want to have some content on my page (some images) change based on the date. With jQuery, how would this be possible? Basically, I am leaving on vacation and my client needs something to change while I'm unavailable. I've been able to do it with ColdFusion for another client, but I don't know how to do it with jQuery. Any help is GRE...

populate select box with mysql data

Hi, I have some trouble with this. I have one database with the following tables: Countries -> All countries of the world are added Cities -> The cities are also added user_profile -> The profile of the user with the fields "country" & "city". Everything works fine, even the populating of the boxes is working. But I don't know how to ...

Jquery and IE 7 - selected property not working for multiple select boxes, even when options are selected

I've a dropdown (multiple select). I choose a few values, they are highlighted correctly, but jQuery doesn't recognize them as selected. this works in firefox and chrome, doesn't work in IE. this is the code $("#myBox" +" option").each(function() { if ($(this).attr("selected") == true) { // do something } } ...

Jquery multiple hide show div

Hello, I have been trying to do this all day. At the end i managed to get it working. I know it is not the best way to do. Can someone please show me a better way. I need 12 altogether. It does not need to be check box either. It can be just a text. I got the idea from com/2006/12/14/using-jquery-to-show-hide-form-elements-based-on-a...

create element on the fly and append a existing element to this, with using jquery

Hi, my existing code as follows $('#'+ContainerId).find('img').each(function(){ // ... }); I want to crate a div element on the fly and append this existing img to this new created div element. Result must be like this which I want <div style="text-align:center"><img src=".." /></div> ...