[jQuery] Re: identifying the nth element and manipulating another nth element

2008-11-03 Thread sperks
7;#clickedItems a').click(function() { >     $('#targetedArea li').eq($a.index(this)).addClass('active'); >     return false; > > }); > > --Klaus > > On 3 Nov., 2

[jQuery] identifying the nth element and manipulating another nth element

2008-11-03 Thread sperks
I'm wanting to target the nth in a list after clicking the nth link. I can target them all individually, but I know there must be a faster way by maybe passing the what element I clicked on. $("#clickedItem a:eq(2

[jQuery] Re: input:empty and remember password

2008-08-26 Thread sperks
ground-repeat: no-repeat; background- position: left; } #SMTuname.empty { background-image: url(/images/username.gif); } #SMTpword.empty { background-image: url(/images/password.gif); } On Aug 26, 10:07 am, sperks <[EMAIL PROTECTED]> wrote: > Karl, > > Thanks, your code reads well

[jQuery] Re: input:empty and remember password

2008-08-26 Thread sperks
n if I can get it to play nice... On Aug 26, 9:46 am, sperks <[EMAIL PROTECTED]> wrote: > Thanks Andy, > > This is a good script for switching input content, but the problem > with a login form is that one of the fields is a password field and > displays as .  Therefore,

[jQuery] Re: input:empty and remember password

2008-08-26 Thread sperks
7;t, so remove the text from the input >         this.value = '';}) > > .bind('blur', function() { >         // If the value is blank, return it to the defaultValue >         if ( this.value.match(/^\s*$/) ) >                 this.value = this.defaultValue; > > }); &

[jQuery] input:empty and remember password

2008-08-25 Thread sperks
I have a script that displays username and password as background images in the input fields when the field is empty and they removes it when on focus (or when there's content left in the field). I then came up against the issue where if someone's browser populates the input fields after their bro

[jQuery] Re: random tab and simple content switching

2008-02-22 Thread sperks
); $('#mainArticle h1 span').addClass("hidden"); $('#' + place + ' h1 span').removeClass("hidden"); $('#mainArticle .teaser').hide(); $('#' + place + ' .teaser').slideDo

[jQuery] Re: random tab and simple content switching

2008-02-21 Thread sperks
update: I'm still looking for the random side of things, but I've got "a" solution for the switching. However, I'm a little concerned that I'm targeting h1 rather than the span (how do I go back two parents?) $(document).ready(function() { $('#mainArticle #latestArticle .teaser').hide();

[jQuery] random tab and simple content switching

2008-02-21 Thread sperks
I'm having trouble with a content switcher and I think my issue is understanding how to targeting utilizing 'this' Here's my HTML and script: [code] tab 1 content tab 1 content $(document).rea

[jQuery] proposed semantic tabs add-on

2007-12-13 Thread sperks
I'm not a jQuery guru but I'm sure that semantic HTML guys and gals out there will understand my rational. I've looked all around, but I can't find a nicely degrading tabs/rotator add-on, so I'm looking for some thoughts on either creating one or improving one. I don't want to step on any toes and

[jQuery] Re: hiding page elements instantly on page load

2007-12-06 Thread sperks
I've always found the best solution is to build the navigation as you would like it to appear without JavaScript enabled and then manipulate it with jQuery. Since the css doesn't have to wait for the DOM to be built like jQuery, the effects will kick in instantly. Example: link 1 li

[jQuery] Re: adding a class to the label of a checked radio button

2007-12-06 Thread sperks
('#searchLabels label').removeClass("selected"); $(this).addClass("selected"); }); }); and here it is in action in the top search area (turn off JS to see how nicely it degrades): http://deliciouslivingmag.com/ On Dec 3, 12:39 pm, sperks <[

[jQuery] Re: adding a class to the label of a checked radio button

2007-12-05 Thread sperks
$('#searchLabels label[for="' + selectedInput + > '"]').addClass("selected"); > }); > > }); > > Cheers > Steve > > On Dec 3, 1:17 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > > > Hi

[jQuery] Re: adding a class to the label of a checked radio button

2007-12-05 Thread sperks
').click( function() { var selectedInput = $(this).attr("id"); $('#searchLabels label').removeClass("selected"); $('#searchLabels label[for="' + selectedInput + '"]').addClass("sele

[jQuery] adding a class to the label of a checked radio button

2007-12-03 Thread sperks
I think that this bit of script is adding a class to the for attribute, but I'm wanting to add the class to the element that has that for attribute. Can anyone help me do the targeting better? Thanks $(document).ready(function() { $('div#searchLabels').addClass('active'); // allows me to

[jQuery] news rotator - looking for some help in cleaning up my code

2007-11-16 Thread sperks
I've got my code working (adapted of Karl Swedberg's Scroll Up News Reader) http://docs.jquery.com/Tutorials:Scroll_Up_Headline_Reader, but I'm sure there's a cleaner (more dynamic) way of checking where I am in the loop so that I don't have to do all the individual click checks $("#topSto

[jQuery] Re: modifying a label when radio input selected

2007-11-14 Thread sperks
27;div#searchLabels label#labelRecipesCat').click(function() { >if (this.checked ){ > $(''div#searchLabels > label#labelRecipesCat'').addClass('selected'); > $(''div#searchLabels > label#labelEntireSite').removeClass(&#x

[jQuery] Re: modifying a label when radio input selected

2007-11-13 Thread sperks
27;div#searchLabels label#labelEntireSite').addClass("selected"); $('div#searchLabels label#labelEntireSite').click(function() { $(this).addClass("selected"); $('div#searchLabels label#labelRecipesCat').removeClass(&quo

[jQuery] Re: modifying a label when radio input selected

2007-11-13 Thread sperks
abelRecipesCat').click(function() { $(this).addClass("selected"); $('div#searchLabels label#labelEntireSite').removeClass("selected"); }); }); On Nov 13, 12:57 pm, sperks <[EMAIL PROTECTED]> wrote: > I have some fo

[jQuery] modifying a label when radio input selected

2007-11-13 Thread sperks
I have some formatting I want to add to a couple of radio buttons. I'm wanting to hide the actual radio buttons and only show the labels which I want to format differently depending on whether they're related radio button is selected or not. HTML: Entire Site R