Hey Steve,

I think regex is possible in the selector so using \\S* as your wildcard.. 

$('#contact_\\S*').each();

Sorry haven't tested the above - but hope it helps you out.

Dave
-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: 26 November 2008 16:18
To: jQuery (English)
Subject: [jQuery] trying to act on certain DIV's and not others


Hi folks,
apologies if this is a completely noob question. I wish to close
(hide) and number of <div>'s whilst leaving others open. I considered the
possibility that it might be feasible in Jquery to act on div's with a
certain pattern in the id name. Not sure if this is true tho; for example

<div id-="contact_blah">
<div id="contact_yak">
<div id="nothanks">

so that the first two div's would be subject to being hidden, and the third
left alone.

I wish essentially to have a series of links toggle the visibility of some
div's, but when a link is clicked and a div is unhidden, - all other divs to
hide.

Any ideas?

best wishes and thanks

Steve / Nibb

Reply via email to