I'm sure that I'm just missing something simple. Basically, I'm trying
the hide the "<fieldset>" element if it contains "<legend>Promotions</
legend>" but I can't get it to work. Here is my latest....

jQuery("fieldset:has('legend':contains:('Promotions'))'").hide();

I've tried several variations of this, including trying to hook onto
the parent element and such, but I just can't get anything to work.
I'll supply what my HTML code looks like below. Any help would be
appreciated.

<h1>Categories</h1>

<fieldset>
    <legend>Cuisines</legend>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="48" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="49" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="50" /
>
</fieldset>

<fieldset>
    <legend>Atmosphere</legend>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="62" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="63" /
>
</fieldset>

<fieldset>
    <legend>Promotions</legend>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="91" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="92" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="93" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="94" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="95" /
>
    <input type="checkbox" name="OnsaleCouponsCategory[]" value="96" /
>
</fieldset>

Reply via email to