I am new to javascript and jquery. I need help to understand the following block of code:
An unordered list with 4 list items:
<ul>
<li id="one" class="hot"><em>fresh</em> figs</li>
<li id="two" class="hot">pine nuts</li>
<li id="three" class="hot">honey</li>
<li id="four">balsamic vinegar</li>
</ul>
The following is the jquery code -
$('li').width('50%');
$('li#two').width('75%');
I expect the width of the second list item to be 75% of 50% of the initial width (on page load). However, the width is only 75% of the initial width. I thought the first jquery statement affect the next one?