jquery

Validating Form

How to validate form fields on submit button using jquery? ...

jquery droppable accepting more than 1 element / selectors

cont from here: http://stackoverflow.com/questions/1444469/jquery-droppable-accept $(".droppable").droppable({ accept: function(d) { if(d.hasClass("foo")||(d.attr("id")=="bar")){ return true; } } }); what if i wasn't targeting an element but a set of elements? like "ul#moo li" for example. how wou...

DIV order swapping / toggling

Hi... I'm hoping that someone might be able to give me some heads up on DIV order swapping, and how best to achieve this via jQuery. Basically what I have is 2 divs... #Front and #Back and a div for toggling which DIV is displayed in the foreground.The effect I am after is not a 'show and hide' as both divs are displayed at the same time...

Embed flash live feed with jQuery

How can I embed this live feed -- it has Javascript and this ac_ff_runcontent: <script src="http://static.awempire.com/Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0','width...

Mapping keystrokes to actual value? - Javascript

Hi folks, any cool libraries that you know about around? =) ...

JQuery lavalamp: Selecting focus/highlighting item within lavalamp when hyperlinks outside lavalamp bar are pressed

Hi I'm hoping someone can help me out with a jQuery lavalamp problem. I have the following - a menu bar using lavalamp. - a div where content is loaded into when link on menu bar is clicked - in my content div I have some links that link to the same pages as in the menu bar The menu bar itself, looks and works great. However I wan't t...

Flash + JQuery Tabs + OS X = Slow

Hey guys, I've developed a small javascript tabbed widget, using jQuery tools. Every single tab contains a Youtube video and you can switch from one video to the other. See a sample here: http://www.warriorlabs.net/index.php?/topic/174-lets-play-oblivion/ On Windows + Chrome / IE / Firefox, it loads up quite fast and "tabs things up ...

jQuery AJAY live hover event?

hey guys, sorry i'm asking this again, but I can't find a solution. I know there are a few posts out there, but for me nothing seems to work. I'm loading a part of a website with the jquery load() method. I'll apply the following rule to all links inside them: $('.file a').live('click', function(e) { alert('click event firde'); }); ...

Jquery make a mouseon / hover event for one element call / simulate a similar even for a different element?

I'm using a plugin that is obscure and doesn't have a good API and, rather than digging around and re-writing it the way I want, I want to just use it the way its built which is that it has a list within a DIV and an action occurs based on moving the mouse over a list item in this DIV.. I want to simulate this so that I can make another ...

Detecting autocomplete on form input with jQuery

I have a form that detects if all the text-fields are valid on each keyup() and focus(); if they're all valid, it will enable the submit button for the user to press. However, if the user fills in one of the text inputs with a browsers autocomplete feature, it prevents the submit button from being enabled. Is there a way to detect if an...

jQuery clone and appendTo duplicating wrong content

I am trying to have a form of text inputs. All inputs will in an ordered list OL/LI structure. There will be a + symbol next to the input that when you click on it, it should create a sub-OL and make a secondary list with another input. If you click it again, it adds another input. The new inputs have + symbols as well and you can do the...

What variable is changing?

Hi, Please tell me what variable is changing on the loop so I can maybe create a if else statement. I'm not a developer so, I really need help. Here's the code $(document).ready(function(){ $("#health").show(); $("#health").hide(); $("#billing").hide(); var arr = [ $("#pension"), $("#health"), $("#billing") ]; var cur = 0...

draggable snap to only four points

Is it possible to snap the draggable to only four points on the site? I tried to do it with some conditions in the drag event, but it didn't work. The hleper is still moving across the whole page. ...

Random image url when reload

Hi, What I want is that the URL to some specific images should change on reload / new visit. No news but this is how it looks today... <li><a href="http://nameToSite/images/bkg1.jpg"&gt;&lt;/a&gt;&lt;/li&gt; Is it possible to make a jQuery url change To something like <li><a href="http://nameToSite/images/randomImages[1].jpg"&g...

set select option back to default selected

I'm trying to set the select option back to the "choices" every time I finish adding a new row. How can I do it here? Please help. Btw, adding new row(s) works just fine. Here is what I've got so far: $(document).ready(function() { $('#Add-btn').live('click',function() { $("#tabName tr:last").before("<tr><td class='greyed'><inp...

hovering: fadeIn, delay, fadeOut. [not working]

Hey all, apologies as this has been asked many times, but I tried the related solutions, and they do not work well for me. on www.Handonam.com/sloshspot, i'm trying to create a hover event where it fades in fast when you hover, then delay and fade out slow when you mouse out from it. I attempted it with this (which is on the site): $...

How to remove mouseover/mouseout event

I have a site with three tabs that I'm trying to dynamically add mouseover/mouseout event depending on which tab is clicked, the problem is that it appears that the mouseover/out events are 'bound' to the tab after they're called. Is there a way to 'unbind' the event from the tabs? Here's what my js looks like onTab1Clicked() { $(...

have list slide up and append the first item to the end of the list.

I want to basically slide all my li's up and the top one, will append to the bottom and it will be a rotation of upcoming events. This is what i have so far. It slides the first one up and appends it to the end of ul, but then it just keeps appending that same li to the ul every 1000 ms. Why doesn't it keep sliding the first one up? ...

AJAX form on page loaded with AJAX...

Howdy, I got a page loaded with $.ajax() jQuery method. Basically, I got a search form on this page that updates results. Now wondering... How to submit AJAX form on that page? I tried to use window.location.href and not provide url in $.ajax() method but it loads (on success) the main page. Any ideas? ...

jQuery trigger event when click outside the element

$(document).click(function(evt) { var target = evt.currentTarget; var inside = $(".menuWraper"); if (target != inside) { alert("bleep"); } }); I am trying to figure out how to make it so that if a user clicks outside of a certain div (menuWraper), it triggers an event.. I realized I can just make every click fi...