jquery

jQuery: delay() or timeout with stop() ??

hey guys, $('.file a').live('mouseenter', function() { $('#download').stop(true, true).fadeIn('fast'); }).live('mouseleave', function() { $('#download').stop(true, true).fadeOut('fast'); }); i want the mouseenter function to have a stop() and a DELAY of like a 1sec. So if i hover over #download the fadeIn should start 1second ...

setTimeout and mouseout problem

I have this code: function beforemouseout() { if ($(this).val() == '') { $(this).val($(this).attr('title')); } else { } setTimeout('beforemouseout()',3000); } $(".other").click(function() { $(this).val(''); $(".other").mouseout(beforemouseout); }); <input id="hour" type="text" class="other" autocomplete="off"...

Processing Dynamic forms on the Server Side

I've seen a lot of questions around here about implementing dynamic forms in jQuery or other javascript libraries, and I think I managed to get up and running in setting up a dynamic form for my test purposes. My question is whats the best practice in naming my form fields and processing them on the server side. I am trying to implemen...

set background image of a css element

Hi, i use the following to to set the text content of an css element var cell = document.createElement('li'); cell.textContent = this.labelForIndex(index); Now i want to set the back-ground image and color.....how to do it?? ...

What's new in jQuery 1.4?

What's new in jQuery(including UI) and will I have problems(using UI dialog and datepicker) when switch to 1.4(and 1.8.2) ? ...

How do I connect jQuery Datepicker to my Ruby on Rails form?

I'm trying to use the jQuery Datepicker to set a date field in my Ruby on Rails form, but I can't work out how to do it. Can someone point me in the right direction? ...

function out $('document').ready()

hi all! i've got this simple code $(document).ready(function(){ $.ajax({ success: function(id) { $('#ele').append('<a href="" onclick="deleteImg(id)">') } }) function deleteImg(id) { foo... } } but, when i click on the created href, i received this error deleteImg is not defined i have to ...

jquery sortable plugin with "sliding effect" ?

Hello! jQueryUI has got a nice plugin, Sortable: http://jqueryui.com/demos/sortable/ I'm very pleased with that plugin but I'm only missing one thing. And that is instead of let the elements that changes position pop/jump to its new position, I'd like them to "slide" to that new position instead. By other words, make it a bit more smoot...

Creating a Vertical menu using jquery

How can i create a page like this? http://i30.tinypic.com/20seslv.gif When i click a link in the left side menu a page must be loaded in the content area, but the whole page must not load. How to do this using jquery is there any plugin to do that? ...

jQuery Validation Plugin - Submit only after checking a variable

I have done some small validation myself and end up with either - myvalid = true or mayvalid = false. How can add this check to the validation I am doing already on my form using the Validation Plugin? ...

Jquery check whether element is hidden (continuously)

Hello, How to check whether a element is made to hide at once. i.e how to notify the visibility of an element. In my case, the element is made to hide by slideUp function. At once i should be notified about the visibility of the that element. I got the idea of using bind() method. But it does not have a onHide like event. So how to ge...

eliminate bouncing ball effect on slidetoggle

it seems like it's in a bit of a loop for a few and then it stabalizes. this person had a similar problem in this video: http://www.youtube.com/watch?v=KCFeImyBzfE also another problem with this code is that once you show the tracklist, then hide it again, the words stop toggling. it ends up saying "hide tracklist" and they are already ...

jqGrid viewGridRow modal dialog labels

Hi, i am trying to manually override the value for caption and bClose for the modal "View Record" Dialog but am unable to do so? I am calling it with jQuery("#list2″).jqGrid('navGrid','#pager2', { view:true, deltext:dt, deltitle:delt, viewtext:vt, viewtitle:vddt, }, //options { ...

jQuery - can I validate a disabled field?

I've got a form where the user needs to click a link, select a user via a popup window which then populates a hidden field with an ID and a display field with the username. The display field is set to disabled="disabled" to force the user to use the popup and not type a value in the field. I need to ensure the user selects a name. I'...

jQuery question about looping through an array

I have an array like this: var gridArray = [ 1,2,0,1,2,3,2,1,2,3,4,4,3,2,2,2,0 ] And I would like a jQuery each() function like this: $('li.node').each(function() { loop through the array var rndTile = the current array digit $(this).css({ 'background-image': 'url(images/'+...

Loading data from form using jquery to php file returns null

When ever I pass a value from a form using submit to a php file using load, $.get or post and try to receive data or load it in general as shown below, I just get ruturned a null or undefined value. Anyone know what im doing wrong ? iNDEX.HTML ` <script type = "text/javascript"> $(document).ready(function(){ $("#NewOrgForm...

Early exit from function?

I have a function: function myfunction() { if (a == 'stop') // How can I stop the function here? ................ } Is there something like exit() in javascript? Thanks. ...

jQuery.each() undefined issue

I have the following code function myFunction(items) { // this prints out 11 alert(items.length); $(items).each(function(i, item) { // item is undefined for some reason } } It I alert the length of items, it has elements in it (11 to be exact). so how could 11 items be present, but jQuery still pass undefined? ...

How can I optimize my routine to build HTML tiles from an array?

As my last question was closed for being "too vague" - here it is again, with better wording. I have a "grid" of li's that are loaded dynamically (through JavaScript/jQuery), the Array isn't huge but seems to take forever loading. So, SO people - my question is: Am I being stupid or is this code taking longer than it should to execute?...

Javascript / jQuery - convert special html characters

Hi I have a pre element with some html code in it. the code has special characters in it, like &lt;, so it doesn't break the page. Then I have a javascript function that gets the contents of this pre element, highlights it (with codemirror), and replaces the element contents with the highlighted text. I'm using $("pre").append(...); t...