jquery

Can I add a unique id attribute to a td from jquery?

I have a table being populated and I would like the td id to be the id number for the data that was returned. How do I assign an id to a td from jquery? var $tr = $('<tr><td class="name"></td></tr>').insertAfter('#newTable tr:last'); $tr.find('.name').html(data.Name); //How do I assign data.id to <td class="name"> ? ...

Jquery UI - Sortable & Draggable revert speed

Hi, i have a problem with the revert speed. Here is a working example http://www.jsfiddle.net/V9Euk/94/ <-- updated Change something in the sortable list ... the speed is fast (revert 100). But when you drop the "four" into the sortable list, the speed is slow. But why? oO kind reagards Peter ...

Jquery pagination with history, stil searching for one...

Hi all... I need jquery pagionation with history support. I've looked at tons of pagination and this works best to me: http://plugins.jquery.com/project/pagination ([demo page])1 Works great! Pages are made dynamically and the script is using OOP which I don't quite understand. But it has no back button/history support which I really ...

jQuery get THIS form input

I am trying to get the values of multiple form inputs, but the problem is I have several identical forms on the same page and only want to get the inputs from the form that was submitted, so I am using the 'this' keyword. This is my code: $('form.contact_form').submit(function(e) { var fname = $(this).children('input.fname').val(); ...

JQuery & cloning huge table

Hello Gurus: I have a huge table, 1 row with around 2600 columns (it's a Gantt chart) What I'm trying to do is to clone this table and copy it 100 times to somewhere on the page (instead of redraw the table 100 times as it seems to be less efficient, I can be wrong though) var $templateTable = $("div#GTT_TLayout").clone(); //there ar...

visual loading feedback to mimic the server request?

we are linking a site over to a slow web service. is it possible to create a jquery animation to show the user that a page is loading? the page isn't on our server. ...

jQuery + Ajax + Loading Spinner Image = Too Fast!

I'm using jQuery in my ASP.NET MVC 2 page. It's a super simple post that gets a date in return. The process itself runs very quickly. I want to use a spinner image to show the user something is going on. All works fine in Firefox, testing locally. However, in IE 8, the spinner image doesn't display long enough; it just flickers. Th...

How "focus" , "make active" , "insert cursor" into textarea at end.

Welcome, I have some link's inside my webpage. Is there any function in jquery / javascript what allow me to put cursor into textarea at end ? When user click at link above textarea, i would like move cursor back where he came from. Now he have to stop typing and click into textarea back. Just like here, when he click for example ...

jQuery: wait to perform a task until an animation finished

I have a div which is placed in any pages. When you click on this div, it will be closed by using jquery checking on its css class: $('.content-box-header').click(function () { $(this).parent().children('.content-box-content').slideFadeToggle(200); } In several pages, I need to set that div with a specific ID in order to perform s...

How to add hover effect to menu using jQuery

Hi. I've got the top menu on this page, implemented as a list (UL with ID "top-nav"): http://bit.ly/dzVXB1 I've been wrestling with it and trying to figure out how to add a fade-in/fade-out effect using jQuery when the user hovers over it. So instead of the background image changing instantly, it would fade in slowly. Here's the HTML:...

debugging javascript attached using bind or delegate

Hi, If javascript is attached to an event using bind or delegate (jquery), it isn't straightforward to debug which elements will respond to which event, not to know if theres anything attached to them. Is there any tool that can help watch and debug the JS attached to events, the javascript runnning on a webpage as a whole ? Thank yo...

jQuery.noConflict() method causing problem in my App

Hi, I am using jQuery in my Rails application. I wanted to add a expand collapse text effect in my page. So I downloaded the jQuery exapander plugin and tried to use it. I am facing a weird problem. My jQuery.js file is having this line called jQuery.noConflict(); at the end. I have to remove it to make this expand collapse effect to w...

jquery drag and drop help

I have this code for a drag and drop portion of my site, I use this HTML first off, <li class="drag_check"> <input type="checkbox" value="Y" class="cv_choice" name="cv_file[<?=$rslt['code'];?>]" id="inp_cv_<?=$rslt['code'];?>" /> </li> and then this code for the drag and drop: var cv_file = new Arr...

Jquery Animation Problem

Hey Guys, I wonder how I can fix this propabably easy problem. Ive installed the color plugin for a smooth change of the backgroundcolor. So but when Im hovering over it a few times in a short amount of time, it'll repeat and repeat the animation like its a stack. How can I fix that? Any idea? $("#page-bar > ul > li").mouseenter(fun...

How to prevent watermark text being sent when a button is clicked?

I've implemented this textbox watermark functionality on some of the text boxes in my solution: http://cysemic.com/2010/03/jquery-textbox-watermark-revisited-making-it-a-plugin/ It's very useful, but it's causing me some problems. Specifically, when I click the submit button when the watermark is present on a text box, the watermark te...

Complex problem in jQuery

Hello, I have a problem that has been consuming me for days. I have a div and the div has a style for it to be hidden ( .copy { display: none; } ). I have a link (Add new) that when clicked, makes a clone of that div and removes the class "copy", causing the div to appear. Inside this div, I have 4 checkbox and a text input. Clicking ...

make my browser blink as indicator

My coworker wrote a quick mvc chat application so we can chat about work stuff without leaving our desks. What are some ways to indicate to each other a new message has been posted? My first thought was make the browser title bar flash. Anyone know how? ...

Jquery - Allow only 2 posts at the same time

Hi, is it possible to say "Allow only 2 posts at the same time" in jquery? kind regards Peter ...

If I use "getElementById" to alter a CSS style of a single object, how do I alter all elements that inherit the style?

All the examples I've seen use "getElementById" to get the single element, and then change that style for that singular element. I'm in the situation where I need to modify all the matching elements on the page with a style. I need to change the font size, height, and width. How do I do this, and is jQuery required or optional? The r...

Auto resize height div according to dynamic child div

Hello All, Begginer in javascript, I'm trying to make a system tabs. All work fine, but when i want a tab with moveable content (in this exemple, i tried with a accordion), the height container div don't resize to child content. $(document).ready(function() { //Tabs init $('#mask').css({'height':$('#panel-1').height()}); $('a[rel=pan...