jquery

JQuery : Add row after the third row of a table

Hello , I have a string as 'new row'.I have a table which as 5 rows.I want to add this string after the third row of my table.How i do this using jQuery or javasript. ...

jQuery, jCarousel

Hi, I'm having trouble setting up jCarousel correctly. It seems like it's finding an extra list element on the ul and at the end of the scroll it scrolls a little bit more. I cannot understand why. The html code is the following: <ul class="demo1"> <li><a href="http://www.youtube.com/watch?v=jfWPDGWP568"&gt;V...

jQuery, get table cell at specific index

Hello, I know that I can get first or last table cell (ex for last row) using jquery expression like below: first cell: $('#table tr:last td:first') or last cell: $('#table tr:last td:last') Can I get cell at specific index, for example index 2, using similliar expression: ex: $('#table tr:last td:[2]')... Regards. ...

how to sort xml data in jQuery

how can i sort all officers based on their ranks jQuery $.get('officers.xml', function(grade){ $(grade).find('officer').each(function(){ var $rank = $(this).attr('rank'); }); }); XML (officer.xml) <grade> <officer rank="2"></student> <officer rank="3"></student> <officer rank="1"></student> </grade> thanks. ...

Jquery ajax() error : "Uncaught Syntax error, unrecognized expression: %2Cacpitool%2Caide"

Hello, I have a error when i tried to send post data with ajax() method. I have a array with : acpitool aide I use encodeURIComponent() for passing the array with data: but the ajax method fail. Could you help me? Thanks Edit : This is the ajax call $.ajax({ url: 'AjaxSearch.php', dataType: 'json', data: param+"...

Jquery effect problem : How to detect if mouseover is triggered by scroll ?

Hello, I have another problem, and because the reply is to fast here i come back again !! I would like to use "key navigation" and for that, i use the keypress event with down/up key ) When my mouse is over a div (div who's contenaing a big table) and i pull the down key : i scroll to next td + change css style + remove the current s...

Anchor tags are blank

I'm having a problem where the my anchor tags sometimes aren't displaying their links. This is happening on Mobile Safari on multiple iPhones, and in the iPhone simulator. I'm using jQtouch r147, PhoneGap, and jQuery 1.4.2. I'm generating the data from a database call, and adding anchor tags to a list like this: for(var i=0;i<data.rows...

How highlight words jquery ui autocomplete

i'm using this script http://jqueryui.com/demos/autocomplete/#default with database. i want to highlight typed words like this: www.docs.jquery.com/Plugins/Autocomplete. Please help me. ...

jQuery get attribute

There are many class="item" blocks on the page. For each one there is different var item_link and ajax request. Ajax searches for src attribute of .message img and throws it to var src. $(".item").each(function(){ var item_link = "http://..."; $(this).prepend('<div class="src"></div>'); $.get(item_link, function(data) { ...

beginner jQuery tabs - add easing effect

I'm using jQuery ui tabs with the following code but am having trouble adding easing or changing the speed of the effect: $('#tabs-mcr > ul').tabs({ fx: { opacity: 'toggle' } }); standard opacity toggle but I'd like to either speed up the fade effect or add custom easing to it. ...

Do we need to differntiate anything for this in IE8?

I have this code in my application var checked = $('#fieldset input[type=checkbox]:checked'); var ids= checked.map(function() { return $(this).val(); }).get().join(','); in firefox I am getting all the checked Ids something like this.. 123,234,443.. but same code in IE...

Disallow typing of few of characters e.g.'<', '>' in all input textboxes using jquery

How do I achieve this:- When user types character like 'abcd' and then '>'(an invalid character for my application), I want to set the text back to 'abcd'. Better if we can cancel the input itself as we do in winforms application. This should happen when user is typing and not on a click of button. I want this to be applied on all text ...

css style remains after click

Hi All, I have a simple test page with a single styled button. I'm using a:hover when you hover over the button. However, when you click the button the a:hover style remains until I click on something else. How would I fix this and why is this happening? Thanks, rod. <asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" ru...

Shift + / Key combination not getting detected by javascript in Firefox on Mac OSX

This javascript code always returns zero for " Shift + / " key combination on Firefox 3.6.3 on OSX 10.5.8 But it returns the expected value 191 on Chrome on OSX/mac GetKeyCode = function(e) { var code = 0; if (!e) { e = window.event } if (e.keyCode) { code = e.keyCode; ...

Fancybox Auto Close, but remain user control

Hi, i've searched through the forum yet i can't find the solution. i'm refering to this thread to do the auto close function: http://groups.google.com/group/fancybox/browse_thread/thread/d09438b7... I did follow JFK's solution which works just right: 'onComplete': function() { $("#fancybox-wrap, #fancybox-overlay").delay(3000).f...

How to Add Horizontal line in Javascript

I would like to add a horizontal seperating line on a dynamic populated table. How do I do this? Below is a snippet. function addNewRow() { $('#displayTable tr:last').after('<tr><td style="font-size:smaller;" class="dataField1"></td><td style="font-size:smaller;" class="dataField2"></td><td style="font-size:smaller;" class="d...

jQuery retrieve parameter from function call

$(document).ready(function(){ $('#cumulative-returns').graph({ width: 400, height: 180, graphtype: 'bar' }); }); I have a binded a function on click to #cumulative-returns and I want to be able to get the graphtype value like.. $('#cumulative-returns').click(function() { al...

How to convert string to XML object in JavaScript?

Hi, I am aware of this question already existing, but it has given me no luck. I have an application which loads a physicial XML document via the following method: jQuery.ajax( { type: "GET", url: fileName, dataType: "xml", success: function(data) { etc... I parse the XML and convert it into a string whic...

jquery draggable not moving up after bottom off goes off of screen

I have made a draggable div with a handle using jquery. When the box goes off the bottom of the screen and then you drag up, the mouse moves but the box does not making the box stick to the mouse causing issue. ...

toggling div as well as "expand/collapse" text and image with jquery

Hi - I have a simple piece of jquery i am using to toggle the visibility of a div (below). What I'd like to add is some text and a little plus sign image that changes to different text and a minus sign image after the div is expanded. Here is my code: jQuery $(document).ready(function(){ $(".toggle").click(function(){ $(".hidden...