[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-24 Thread Ridge
Wizzud, Everything seems to work fine! Your fix did the trick, and the form (the Home one at least - I haven't set the rest up as yet) submits perfectly. Thanks so much! On May 24, 5:32 am, Wizzud <[EMAIL PROTECTED]> wrote: > Ok. > Couple of things. > I put a 'return false;' at the end of the c

[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-24 Thread Wizzud
Ok. Couple of things. I put a 'return false;' at the end of the click handler (sorry - tends to be a reflex action!) when it doesn't actually need it. Either shift it up to be within the 'if...' statement block, or remove it altogether. It prevents focussing on the input element and activating the

[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-23 Thread Ridge
Oooh SO close Wizzud! Followed your instructions carefully, and set the height of the form equal to the height of div.col. The forms now toggle correctly, stay on when the user is inputting their zip, BUT (taking For Your Home, for example) doesn't submit when the Go button is clicked. It also do

[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-23 Thread Wizzud
$('div#homepage_boxes> div.col').click(function(event) { // only toggle if it was div.col or its H2 that was clicked... if ( this==event.target || $(event.target).is('h2') ){ $(this).siblings('.selected').andSelf().toggleClass('selected'); } return false; }); And you shoul

[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-23 Thread Ridge
Karl, thanks. I modifed your line slightly to give it the same specificity as the preceding declaration (it wasn't working at all when it was just 'form'), and now the form isn't appearing at all on click! Here's the whole section: // Show/hide forms $('div#homepage_boxes form').hide();

[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-23 Thread Karl Swedberg
This line: if ($tgt.not('form')) { //don't toggle when clicking the form! should be : if (!$tgt.is('form')) { //don't toggle when clicking the form! The first always returns the jQuery object, so it's always "truthy." The second returns a boolean. Will be true if the target e

[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-23 Thread Ridge
Hm. Replaced my code with yours, and it's still toggling the form when its clicked. :( On May 22, 5:29 pm, Pyrolupus <[EMAIL PROTECTED]> wrote: > You need to have your event handler handle things differently > depending upon the specific child element that was clicked. > > For example: > > $('div

[jQuery] Re: Show/hide toggle hides form too...bah!

2008-05-22 Thread Pyrolupus
You need to have your event handler handle things differently depending upon the specific child element that was clicked. For example: $('div#homepage_boxes> div.col').click(function(event) { var $tgt = $(event.target); if ($tgt.not('form')) { //don't toggle when clicking the for