[jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Scott Sauyet
On Dec 31 2009, 5:10 pm, Šime Vidas sime.vi...@gmail.com wrote: Scott, you used A elements as JS triggers which is not proper... the A element is for linking to other web-resources. If you need an element for onclick JS execution, just use a button or a SPAN element Well, I was modifying

[jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Šime Vidas
The A element is to be used to link to an web-resource, an you are not doing that. # (as in href=#) is not a URI for a web-resource, I'm not even sure that it is a valid URI at all. So to be clear, you are misusing the A element. OK, now, you have to set the href attribute to # and make the click

Re: [jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Karl Swedberg
Šime, Sorry, but I agree with Scott for the most part. On Jan 1, 2010, at 10:55 AM, Šime Vidas wrote: So, you are: 1. going against the standard (misusing the A) Easily solved by adding a hash identifier: pa id=slick-toggle href=#content1More Details/a/p div id=content1

[jQuery] Re: Help on Independent DIV's that toggle!!

2010-01-01 Thread Šime Vidas
# actually is valid (sorry about that)... So. let' sum up... We want keyboard accessibility, so we have to use either a A, or a BUTTON / INPUT type=button... If we choose the A element, we have to set the href attribute (I'd rather set it to '#, than to deal with fragment identifiers... we

[jQuery] Re: Help on Independent DIV's that toggle!!

2009-12-31 Thread Scott Sauyet
On Dec 30, 8:00 pm, Erik R. Peterson eriks...@mac.com wrote: Wow...  I'm just now getting back to this and I am totally messed up.   I never thought it would be such a challenge. It's not that this is a challenge. There are many different directions you could go from here. You didn't supply

[jQuery] Re: Help on Independent DIV's that toggle!!

2009-12-31 Thread Šime Vidas
Scott, you used A elements as JS triggers which is not proper... the A element is for linking to other web-resources. If you need an element for onclick JS execution, just use a button or a SPAN element The one time where you do bind click event handlers to A elements, is to prevent the

Re: [jQuery] Re: Help on Independent DIV's that toggle!!

2009-12-30 Thread brian
On Tue, Dec 29, 2009 at 11:11 PM, Erik eriks...@mac.com wrote: Brian, It looks like you just added  $(this).next That, and used class names in the selector, rather than a unique ID, so that it operates on a set of elements. Using next() assumes that each link comes just before the div that it

Re: [jQuery] Re: Help on Independent DIV's that toggle!!

2009-12-30 Thread Erik R. Peterson
Wow... I'm just now getting back to this and I am totally messed up. I never thought it would be such a challenge. I thank you. Erik On Dec 30, 2009, at 12:40 PM, brian wrote: On Tue, Dec 29, 2009 at 11:11 PM, Erik eriks...@mac.com wrote: Brian, It looks like you just added

[jQuery] Re: Help on Independent DIV's that toggle!!

2009-12-29 Thread Šime Vidas
Here is my solution: The HTML structure of each DIV: div class=article p Basic content /p p class=details Additional content /p /div The JS code: // the clickable more details SPAN element (as a string) var $showMore = span class='showMore'More Details/span;

[jQuery] Re: Help on Independent DIV's that toggle!!

2009-12-29 Thread Erik
Brian, It looks like you just added $(this).next