Do I correctly read that Zen Cart is properly outputting the page-specific js that you've asked it to?
And that your problem is really just that your custom javascript/jquery code isn't performing as you intended?
Do I correctly read that Zen Cart is properly outputting the page-specific js that you've asked it to?
And that your problem is really just that your custom javascript/jquery code isn't performing as you intended?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Yes. I know the js file works by the above-mentioned alert("alert"); works.
But anything to change the background color value of the css button containing the phrase 'Check Out' does not work.
This is why I'm puzzled...and wondering if this particular JS should be in the onLoad??
I want the proper defined button color to appear when the page loads before anyone ever clicks or mouses anything.
I've also tried to change the background-color attribute of the btn-primary class with attr() to no avail...
Thank you, Tom
More trial and error got things working:
1) moved all javascript to its proper place into the bottom of the page in tpl_footer.php, since best practice is to always put all javascript at the bottom of the page
2) use this code for now:
if ($("span:contains('Check Out')")) {
$(".btn-primary").css("color", "green");
}
However, the template uses Twitter Bootstrap, which contains horridly excessively complicated css button code, requiring considerably more testing to determine what colors to use etc. depending on the text.
The jQ code above changes the actual css of the .btn-primary class, in this case the text color for testing.
Thank you, Tom