Your welcome! Envoyé de mon iPod
Le 2009-10-08 à 22:57, hsfrey <hsf...@gmail.com> a écrit : > > Giovanni: > > Thank you for your response. > >> I can't understand what value are you looking for, but should be >> something link $('#id').val() or $(this).val(). > > I'm trying to get the jQuery code to replace this JS which works to > toggle the label: > > function togl(b1) { > var t1 = document.getElementById(b1).getElementsByTagName("input"); > var labl = t1[0].value; > t1[0].value = labl=="Hide"?"Show":"Hide"; > ... > } > > In addition, rather than just Match the ID, I want to match the ID > which ENDS in the string contained in b1. > A simple "#"+b1 won't do that, which is why I used ["[id$="+b1="]". > > The target of the JS is the html: > <div id="box1" ...> > <input type=button value="Hide" onclick="togl('box1')"/> > ... > </div> > > Harvey >