Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Attributes dependent on 1st choice?

Attributes dependent on 1st choice?

Locked

Views: 7,138

Results 21 to 23 of 23
This thread is locked. New replies are disabled.
28 Oct 2010, 6:13 PM
#21
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Attributes dependent on 1st choice?

Hmm i understand your problem now.

Well, looks like you're calling jquery on objects based on the attribute ID#, which seems to work well in chrome.

$("#attrib-2").val('8');

Why not try that on this line too, instead of using the name of the option?

jQuery("option:contains('Select Value.')").hide();
28 Oct 2010, 8:05 PM
#22
ogrelink avatar

ogrelink

New Zenner

Join Date:
Aug 2010
Posts:
11
Plugin Contributions:
0

Re: Attributes dependent on 1st choice?

Does not work either :(

Tried quite a variant of it and none removes the option. Is there something wrong with my syntax?

<select name="numberItems" id="id_numberItems"> 
<div class="sd"><option value="1" selected="selected">1</option></div> 
<option value="2">2</option> 
<option value="3">3</option> 
<option value="4">4</option> 
<option value="5">5</option> 
</select>

<div class="ad">test</div>

<script type="text/javascript" src="jQuery.js"></script>
<script type="text/javascript">



$('.sd').hide();
$('.ad').hide();
jQuery("option:value('5')").hide();

jQuery("'numberItems' option[value='5']").hide();
jQuery("option:contains('5')").hide();
jQuery("'#id_numberItems' option[value='5']").hide();
$("#id_numberItems").val('5').hide();
jQuery("'div .ad'").hide()
</script>
28 Oct 2010, 8:23 PM
#23
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Attributes dependent on 1st choice?

Hmmm, a search at Google gives me the thought that chrome simply has a problem using jquery to hide <options>.

Try searching on Google and find a jquery forum where they can go in-depth on a solution for Chrome. Also, try testing in IE too and see if the problem persists there as well.