Using jQuery and Prototype together while avoiding the dreaded element.dispatchEvent error
161
post-template-default,single,single-post,postid-161,single-format-standard,bridge-core-3.0.1,qodef-qi--no-touch,qi-addons-for-elementor-1.5.3,qode-page-transition-enabled,ajax_updown,page_not_loaded,,vertical_menu_enabled,side_area_uncovered_from_content,qode-theme-ver-28.7,qode-theme-bridge,disabled_footer_top,qode_header_in_grid,wpb-js-composer js-comp-ver-6.8.0,vc_responsive,elementor-default,elementor-kit-6

Using jQuery and Prototype together while avoiding the dreaded element.dispatchEvent error

Using jQuery and Prototype together while avoiding the dreaded element.dispatchEvent error

Here is what I do to avoid the dreaded “element.dispatchEvent is not a function” error. I load jQuery first, Prototype second, and then I use jQuery( ) instead of $( ) for all my jQuery calls.

 <!--  Set up jQuery and prototype together  -->
 <script src="http://www.google.com/jsapi"></script>
 <script>
 google.load("jquery", "1.3.2");
 google.load("prototype", "1.6.0.3");
 google.setOnLoadCallback(function() {
  jQuery('#helphide').hide();
  jQuery('#helpbutton').click( function(){
    jQuery('#helphide').toggle();
 });
 });
 </script>


Mastodon