I am working on a website that contains two elements with the same "id"
(but different case) ie "freeshipping"
versus "freeShipping"
. When I try to select the freeShipping
element in JS, the browser returns the content of freeshipping
instead. On my coworker's computer it works just fine.
Does anyone have any idea why it would act as case insensitive in this case? I've been looking online and all I can find is people complaining at other people saying "use the same case". However, no answer to my question about why the case sensitivity is not working.
<div id="freeshipping" style="display: none; padding: 15px;">
Free Shipping on orders over $199!
</div>
<span id="freeShipping" class="stock">#freeShippingQualifierText#</span>
EDIT:
$freeShipping = $('#freeShipping');
$freeShipping.text('Free Shipping!');