alexscriptsearch
08-23-2012, 05:41 AM
Hi,
I am using the jQuery cycle plugin to run a basic slider containing 3 slides (A, B, C) of a text header and an image.
I want to be able to display slide A and B on Mon, Wed, Fri, Sun;
then slide A and C on Tue, Thurs, Sat.
So I am looking for some kind of script or PHP based solution to turn content on and off based on the day of the week. Does anyone have any suggestions for the best approach?
Here is a link and an example of my code:
http://www.alexcreedy.com/slide/sample-code-for-forum.html (http://www.alexcreedy.com/slide/sample-code-for-forum.html)
<html>
<head>
<script type="text/javascript" src="/slide/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="/slide/js/jquery.cycle.all.min.js"></script>
<script type="text/javascript">
$(function() {
$('#solutionFade').cycle({
fx: 'fade',
speed: 500,
timeout: 3000,
});
});;
</script>
</head>
<body>
<div id="solutionFade">
<div>
<h2 class="solutionHead">SLIDE A</h2>
<img src="/slide/img/slide_A.jpg"/>
</div>
<div>
<h2 class="solutionHead">SLIDE B</h2>
<img src="/slide/img/slide_B.jpg"/>
</div>
<div>
<h2 class="solutionHead">SLIDE C</h2>
<img src="/slide/img/slide_C.jpg"/>
</div>
</div><!-- /solutionFade -->
</body>
</html>
regards, Alex
I am using the jQuery cycle plugin to run a basic slider containing 3 slides (A, B, C) of a text header and an image.
I want to be able to display slide A and B on Mon, Wed, Fri, Sun;
then slide A and C on Tue, Thurs, Sat.
So I am looking for some kind of script or PHP based solution to turn content on and off based on the day of the week. Does anyone have any suggestions for the best approach?
Here is a link and an example of my code:
http://www.alexcreedy.com/slide/sample-code-for-forum.html (http://www.alexcreedy.com/slide/sample-code-for-forum.html)
<html>
<head>
<script type="text/javascript" src="/slide/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="/slide/js/jquery.cycle.all.min.js"></script>
<script type="text/javascript">
$(function() {
$('#solutionFade').cycle({
fx: 'fade',
speed: 500,
timeout: 3000,
});
});;
</script>
</head>
<body>
<div id="solutionFade">
<div>
<h2 class="solutionHead">SLIDE A</h2>
<img src="/slide/img/slide_A.jpg"/>
</div>
<div>
<h2 class="solutionHead">SLIDE B</h2>
<img src="/slide/img/slide_B.jpg"/>
</div>
<div>
<h2 class="solutionHead">SLIDE C</h2>
<img src="/slide/img/slide_C.jpg"/>
</div>
</div><!-- /solutionFade -->
</body>
</html>
regards, Alex