Solution of “Error: element.dispatchEvent is not a function Source” Error

When u r facing this type of error “Error: element.dispatchEvent is not a function Source”. It means a problem of conflict of the jQuery . It can easy to over come to reduce the error

<html>
 <head>
   <script src="prototype.js"></script>
   <script src="jquery.js"></script>
   <script>
     jQuery.noConflict();
     
     // Put all your code in your document ready area
     jQuery(document).ready(function($){
       // Do jQuery stuff using $
       $("div").hide();
     });
     
     // Use Prototype with $(...), etc.
     $('someid').hide();
   </script>
 </head>
 <body></body>
 </html>

Advertisements

Tagged:

6 thoughts on “Solution of “Error: element.dispatchEvent is not a function Source” Error

  1. A.Hemanth Sai October 21, 2011 at 3:51 pm Reply

    hi
    i already wrote jquery.noConflict in head.phthml
    but still i am getting the same error
    Thanks
    A.Hemanth

  2. Sofi January 3, 2012 at 10:33 pm Reply

    It’s not works – my web is disappears

  3. Junaid March 18, 2012 at 12:31 am Reply

    Its working…

    use complete scripts

    jQuery.noConflict();
    jQuery(document).ready(yourfunctionname($){…..

  4. titan21 March 27, 2012 at 1:58 pm Reply

    I wrote a specific guide to integrating Lokesh Dhakar’s Lightbox 2:

    http://www.titan21.co.uk/articles/jquery/using-jquery-with-other-libraries.php

  5. Juan Carlos Sosa (@JuanC_Sosa) April 19, 2012 at 1:05 am Reply

    Check the last part of the JQuery documentation http://docs.jquery.com/Using_jQuery_with_Other_Libraries , I did it and it works, very simple and you dont need to use te jQuery.noConflict(); just change the $ for jQuery.

  6. noticiasdehoy.co July 7, 2017 at 2:43 am Reply

    magnificent publish, very informative. I wonder why the opposite experts
    of this sector don’t notice this. You should continue
    your writing. I’m confident, you have a huge readers’ base already!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: