Hi
I’m using jQuery Simple Fade SlideShow (http://www.simplefadeslideshow.com) on a project, but I have a problem with the place where jQuery is loaded with registerCoreScript.
My code is in <head> and is this:
<?php
Yii::app()->getClientScript()->registerCoreScript('jquery');
$cs=Yii::app()->getClientScript();
$cs->registerScriptFile(Yii::app()->baseUrl . '/js/FadeSlideShow/fadeSlideShow-minified.js', CClientScript::POS_HEAD);
?>
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#slideshow').fadeSlideShow({
interval: 8000,
width: 960,
height: 428,
PlayPauseElement: false,
NextElement: false,
PrevElement: false,
ListElement: false
});
});
</script>
The problem is that jquery and fadeSlideShow are being loaded after the function and I don’t know why. And because of that, when the function is called, it does not “know” jquery at that time.
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#slideshow').fadeSlideShow({
interval: 8000,
width: 960,
height: 428,
PlayPauseElement: false,
NextElement: false,
PrevElement: false,
ListElement: false
});
});
</script>
<script type="text/javascript" src="/lineamedica/assets/d8abba8f/jquery.js"></script>
<script type="text/javascript" src="/lineamedica/js/FadeSlideShow/fadeSlideShow-minified.js"></script>
Can someone help me?
TIA