user1929236
user1929236

Reputation: 125

javascript not working in chrome,safari,ie etc

I have an javascript code for the video change in joomla based website but it is not showing in chrome,safari,internet explorer but it is getting displayed in Mozilla Firefox. Here is a code for the javascript.

<script type="text/ecmascript">

$(document).ready(function() {
        $("ul.videolist").ytplaylist({addThumbs:true, autoPlay: false, holderId: 'ytvideo'});
    });

here is the live link : http://great.server279.com/greatofficiants

Upvotes: 0

Views: 229

Answers (1)

Ahmad Alfy
Ahmad Alfy

Reputation: 13371

I think I know what's wrong and I will post my answer but you know what, I think what we should be talking about is how to make you a better debugger. A post like that you wrote doesn't really help us or help you. First of all more important than what your code is, What does your console say?

If you are using Google Chrome press F12 or Ctrl+Shift+J and look at the console panel. Are there any messages you could share with us?

Any way, that's what on my mind

Joomla by default loads MooTools in the header so what I have in mind is that you either didn't load jQuery library or it's loaded and it's conflicting with MooTools.

Try changing your code to:

  <script type="text/javascript">
      window.addEvent('domready', function() {
          jQuery("ul.videolist").ytplaylist({
               addThumbs: true,
               autoPlay:  false,
               holderId: 'ytvideo'
           });
      });
  </script>

and make sure that you already called jQuery and your code contains jQuery.noConflict();

Upvotes: 1

Related Questions