Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Having trouble getting to work both jquery plugins at the same time

Featured Replies

So I'm trying to place the following two java plugins on the homepage of my SMF portal. One is a simple JQuery image slider and the other is a Jquery video library. They're both very light-weight plugins but for some reason having trouble getting both of them to work at the same time. Either one of them breaks while the other works and by breaks I mean, the images won't display - the loading bar just keeps going on. I tried them on same blocks and on two different blocks too, no luck.

 

This is the code for the image slider:

<link rel="stylesheet" type="text/css" href="css/style4.css" />
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.easing.js"></script>
<script language="javascript" type="text/javascript" src="js/script.js"></script>
<script type="text/javascript">
$(document).ready( function(){
// buttons for next and previous item
var buttons = { previous:$('#jslidernews1 .button-previous') ,
next:$('#jslidernews1 .button-next') };
$obj = $('#jslidernews1').lofJSidernews( { interval : 4000,
easing : 'easeInOutQuad',
duration : 1200,
auto : true,
maxItemDisplay : 3,
startItem:1,
navPosition : 'horizontal', // horizontal
navigatorHeight : null,
navigatorWidth : null,
mainWidth:980,
buttons:buttons} );
});
</script>

<div id="container">
<!------------------------------------- THE CONTENT ------------------------------------------------->
<div id="jslidernews1" class="lof-slidecontent" style="width:625px; height:294px;">
<div class="preload"><div></div></div>
<div class="button-previous">Previous</div>
<div class="button-next">Next</div>
<!-- MAIN CONTENT -->
<div class="main-slider-content" style="width:625px; height:294px;">
<ul class="sliders-wrap-inner">
<li>
<img src="images/thumbl_980x340.png" title="Newsflash 2" >
<div class="slider-description">
<div class="slider-meta"><a target="_parent" title="Newsflash 1" href="#Category-1">/ Newsflash 1 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 1</h4>
<p>The one thing about a Web site, it always changes! Joomla! makes it easy to add Articles, content,...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
<li>
<img src="images/thumbl_980x340_002.png" title="Newsflash 1" >
<div class="slider-description">
<div class="slider-meta"><a target="_parent" title="Newsflash 2" href="#Category-2">/ Newsflash 2 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 2</h4>
<p>Joomla! makes it easy to launch a Web site of any kind. Whether you want a brochure site or you are...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
<li>
<img src="images/thumbl_980x340_003.png" title="Newsflash 3" >
<div class="slider-description">
<div class="slider-meta"><a target="_parent" title="Newsflash 3" href="#Category-3">/ Newsflash 3 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 3</h4>
<p>With a library of thousands of free Extensions, you can add what you need as your site grows. Don't...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
<li>
<img src="images/thumbl_980x340_004.png" title="Newsflash 5" >
<div class="slider-description">
<div class="slider-meta"><a target="_parent" title="Newsflash 4" href="#Category-4">/ Newsflash 4 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 4</h4>
<p>Joomla! 1.5 - 'Experience the Freedom'!. It has never been easier to create your own dynamic Web...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
<li>
<img src="images/thumbl_980x340_005.png" title="Newsflash 5" >
<div class="slider-description">
<div class="slider-meta"><a target="_parent" title="Newsflash 5" href="#">/ Newsflash 5 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 5</h4>
<p>Joomla! 1.5 - 'Experience the Freedom'!. It has never been easier to create your own dynamic Web...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
<li>

<img src="images/thumbl_980x340_006.png" title="Newsflash 5" >
<div class="slider-description">
<div class="slider-meta"><a target="_parent" title="Newsflash 6" href="#">/ Newsflash 6 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 6</h4>
<p>Joomla! 1.5 - 'Experience the Freedom'!. It has never been easier to create your own dynamic Web...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
<li>
<img src="images/thumbl_980x340_007.png" title="Newsflash 5" >
<div class="slider-description">
<div class="slider-meta"><a target="_parent" title="Newsflash 7" href="#">/ Newsflash 7 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 7</h4>
<p>Joomla! 1.5 - 'Experience the Freedom'!. It has never been easier to create your own dynamic Web...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
<li>
<img src="images/thumbl_980x340_008.png" title="Newsflash 8" >
<div class="slider-description">

<div class="slider-meta"><a target="_parent" title="Newsflash 8" href="#">/ Newsflash 8 /</a> <i> — Monday, February 15, 2010 12:42</i></div>
<h4>Content of Newsflash 8</h4>
<p>Joomla! 1.5 - 'Experience the Freedom'!. It has never been easier to create your own dynamic Web...
<a class="readmore" href="#">Read more </a>
</p>
</div>
</li>
</ul>
</div>
<!-- END MAIN CONTENT -->
<!-- NAVIGATOR -->
<div class="navigator-content">
<div class="button-control"><span></span></div>
<div class="navigator-wrapper">
<ul class="navigator-wrap-inner">
<li><span>1</span></li>
<li><span>2</span></li>
<li><span>3</span></li>
<li><span>4</span></li>
<li><span>5</span></li>
<li><span>6</span></li>
<li><span>7</span></li>
<li><span>8</span></li>
</ul>
</div>

</div>
<!----------------- END OF NAVIGATOR --------------------->
</div>


<!------------------------------------- END OF THE CONTENT ------------------------------------------------->



 

And this is the video library code:

<!------------------------------------- ANYTHING SLIDER START ------------------------------------------------->




<!-- jQuery (required) -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')</script>

<!-- Anything Slider optional plugins, but needed so the embeded video controls will work in IE -->
<!-- http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js -->
<script src="js/swfobject.js"></script>

<!-- Anything Slider -->
<link rel="stylesheet" href="css/anythingslider.css">
<script src="js/jquery.anythingslider.js"></script>

<!-- AnythingSlider video extension; optional, but needed to control video pause/play -->
<script src="js/jquery.anythingslider.video.js"></script>

<script>
// DOM Ready
$(function(){
$('#slider').anythingSlider({
resizeContents : true,
addWmodeToObject : 'transparent',
navigationFormatter : function(index, panel){
}
});
});
</script>

<!-- START AnythingSlider -->
<ul id="slider">

<!-- Vimeo: iframe -->
<li class="panel1"><iframe src="http://player.vimeo.com/video/18011143?title=0&byline=0&portrait=0" width="280" height="300" frameborder="0"></iframe></li>

<!-- Vimeo: Embeded -->
<li class="panel2"><object width="280" height="300"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12280336&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=12280336&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="940" height="529"></embed></object></li>

<!-- YouTube: iframe -->
<li class="panel3"><iframe title="YouTube video player" width="280" height="300" src="http://www.youtube.com/embed/1gOyrAVZHi4" frameborder="0" allowfullscreen></iframe></li>

<!-- YouTube: Embedded -->
<li class="panel4"><object width="280" height="300"><param name="movie" value="http://www.youtube.com/v/zSgiXGELjbc&hl=en_US&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zSgiXGELjbc&hl=en_US&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></li>

<!-- HTML5 Video -->
<li class="panel5">
<video width="280" height="300" controls="controls">
<source src="demos/video/movie.ogg" type="video/ogg">
<source src="demos/video/movie.mp4" type="video/mp4">
<source src="demos/video/movie.webm" type="video/webm">
Your browser does not support the video tag. But you could include an iframe/embeded video here.
</video>
</li>

 

Please tell me how I can make both code not clash in anyway.

Edited by agent47

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.