Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have gone ahead and created this sample file as starting point for you to use with a ScriptTag: <a href="http://gist.github.com/carolineschnapp/5397337" rel="nofollow">http://gist.github.com/carolineschnapp/5397337</a> It will show you how to load jQuery if jQuery is not defined or too old for your needs, without breaking the shop's theme. You need to use jQuery.noConflict. It can be done easily without colateral damage.</p> <p>I also wrote the following which is a terrible read, probably the worst thing written in my documentation career, but it is full of wisdom: <a href="http://docs.shopify.com/api/tutorials/using-javascript-responsibly" rel="nofollow">http://docs.shopify.com/api/tutorials/using-javascript-responsibly</a> I hope it convinces you to stick to using ScripTag.</p> <p>As far as loading the Shopify jQuery AJAX library, I totally would not. I'd use my own code, with jQuery, to do whatever it is that I need to do. I hate to say it but it's too simple to use your own code, it really is. You don't need the helper file at all, it's unnecessary bloat and by using it you run into possible situations of conflict because the theme may be using it as well. If a theme uses it to ajaxify the cart or load products using Ajax, it is redefining some callback functions defined within the helper file. You'll break all of those callbacks by simply loading the file again. People will add items to the cart and all of a sudden an alert will show up on their page, or instead of a product loaded on the page via Ajax all of a sudden the theme will show an alert saying "We now have all the info you requested about product X" with no product being added to the page. No good has ever come out of any app using jquery.api.js.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload