Look at jquerys find functions Sent from my iPhone
On 11 Nov 2009, at 12:36, David pr <davidpric...@gmail.com> wrote:
Hello, Could you help me please. I have a list of hotel which I .hide and .show div's to show more or less info. so i have <div class="Hide-BAT1 ... > to <div class="Hide-Bat55 … > when the user press a button I use the code var Hcode = $(this).attr("custom"); $('div.Hide-' + Hcode).toggle(); but when the page loads how do I hide this div automatically ? I have used for (i = 0; i <= 70; i++) { $("div.Hide-BAT" + i).hide(); } But its slow and probably not the best way to do it ? Hope you can help and this makes sense. Regards David