1

I need some custom JS (jQuery to be precise) to run on ubercart's /cart/checkout page. I turned off JS optimization and tried adding it to several different files that are already loading and the JS never fires. It is in the page as if I view-source I can search and find it. I did put $(document).ready(... so it should be waiting for the page to load before running. If I run the same JS from the console of firefox or chrome it does exactly what it's supposed to do. The JS files are all loaded with drupal_add_js().

My only solution at this point is the make a block that only contains that JS and only shows on that page, which it not an optimum solution, but will probably work. Anything else I'm missing on this though?

  • Did end up adding a block that shows only on that page which does the JS/JQuery and it did work, but still interested if anybody has another, better, solution. – Peter Oct 15 '12 at 19:39
  • Would you please post an answer with the solution that you found. – Wtower Feb 24 '14 at 18:08
0

Only solution I came up with for this was to create a block, assign a blocktheme and in the tpl.php file put the JS. Then assign the block to only show on that page. Bit of a work-around, but it did work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.