javascript - <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> Breaks my Site, but I need for Event Tracking -


i need jquery event tracking plugins. work following:

<script src="//code.jquery.com/jquery-1.11.1.min.js"></script> 

&

$('.home .et_pb_more_button').on('click',function() { ga('send', 'event', 'button', 'click', 'case study'); }); 

problem...the jquery code breaks functionality of website. how can track events in google analytics, not break jquery functionality?

the site directiveconsulting.com

wordpress loads in jquery automatically admin side of things among other things.

try using jquery in noconflict mode or calling function using jquery instead of $

jquery('.home .et_pb_more_button').on('click',function() {     ga('send', 'event', 'button', 'click', 'case study'); }); 

read here noconflict: documentation


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

c# - ItextSharp font color issue in ver 5.5.4+ -

how does one get csharp-sqlite to throw exceptions for duplicates or foreign key constraint violations -