I have this generated code in zencart which is emplaced by one of the shopping cart files into the shopping cart display (rows):
<span class="btn btn-primary">
Check Out
</span>
btn-primary class sets the button background color to blue
I want to use javascript/jQuery to give this button a different background color.
Please do not tell me change the css, I already know how to do that, it will not do what I need.
I have this jQuery code in /modules/pages/shopping_cart/jscript_buttons.js:
("span.btn.btn-primary:contains('Check Out')").css("background-color", "purple");
Nothing happens to the check out button, can anyone suggest why??
I've tried several variations on the span part...
span.btn.btn-primary corresponds to the styles, contains means it has the phrase 'Check Out', so it SHOULD work but it does not, why???
Thank you, Tom


Reply With Quote

