I have a space on my page reserved for a banner to denote religious / special events and other notices that may be important for that specific day. At the moment the relevant banner is uploaded the night before ready for the next day.
A bit of research has led me to develop an automated Javascript script that loads up the relevant days banner using the getDate() and getDay() functions. This, however, means I have to name the banner for January 1st as 1.jpg in a folder named Ƈ'.
What I am wondering is whether it's possible to draw up a spreadsheet (or text file) so that I can type in a more memorable filename (e.g. 'christmasDay.jpg') and it locates it in the folder and displays it on that relevant day. Is it possible for Javascript to do this sort of thing?
Another thing I've thought of (as an advanced bit, don't want to run before walking!) is perhaps to have a random banner from a selection shown if there isn't a religious date / special event on a specific day.
I can't get jQuery working at all with IE7. I'm using the jQuery Cycle plugin, but I believe this problem is with jQuery (and the fact that I'm am a newbie). I'm trying to use an banner rotator, which works on Firefox, Safari and IE8. On IE7, it is not even activating... it just shows each div one after another.
I am a student and am currently developing my first wordpress based website. I currently have two conflicting javascripts on my home page (splash.php). The first is a banner that uses mootools and the other is the bxslider jQuery script.
I'm using jBanner nowfor a simple banner ad rotator but now my client wants it to have some type of "player" controls similar to this (done in Flash): [URL] where the little rectangles on the bottom change for each new banner, if someone clicks on one of the rectangles the automatic banner rotation stops, etc. Does anyone know of any plugins??? Would this be called something other than "banner rotator" when I'm doing a search?
For my homepage, I would like a jquery plugin that automatically rotates through pictures, allows text captions, and has a thumbnail script. What plugins would you recommend? Which is the most common used?
I would like to be able to load new sets of images everytime I hit refresh and use rollover. Code: uses this idea. Everytime you log into their website, you get a new image. if you roll the mouse over the menu on the left of the picture, you get different rollover text on the picture.
What I have so far is image rotator, which will randomly load differnt photo everytime you access the website. However, I don't how to do the complete thing.
I am trying to make a simple image rotator using JQuery. It seems to work for first loop however it does not iterate back to the start of images once it reaches the last image. I have tested and the code is getting the first image reference but due to some reason it is not working. I have attached my code.
I used the code here for my photo rotator: [URL]. It works when there's one rotator on the page, but I need to add a few and that does not work. function theRotator() { //Set the opacity of all images to 0 $('.photos img').css({opacity: 0.0}); //Get the first image and display it (gets set to full opacity) $('.photos img:first').css({opacity: 1.0}); //Call the rotator function to run the slideshow, 4000 = change to next image after 4 seconds setInterval('rotate()',4000); } function rotate() { //Get the first image var current = ($('.photos img.show')? $('.photos img.show') : $('.photos img:first')); var currentButton = ($('.photos a.active')? $('.photos a.active') : $('.photos a:first')); //Get next image, when it reaches the end, rotate it back to the first image var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('.photos img:first') :current.next()) : $('.photos img:first')); var nextButton = ((currentButton.next().length) ? ((currentButton.next().hasClass('active')) ? $('.photos a:first') :currentButton.next()) : $('.photos a:first')); //Set the fade in effect for the next image, the show class has higher z-index next.css({opacity: 0.0}) .addClass('show') .animate({opacity: 1.0}, 1000); nextButton.addClass('active'); //Hide the current image current.animate({opacity: 0.0}, 1000) .removeClass('show'); currentButton.removeClass('active'); }; $(document).ready(function() { //Load the slideshow theRotator();});
I'm trying to use an image rotator on a site. I've been told that we are set up to use Jquery plugins. But I'm not exactly sure what that means. Do I need to upload the jquery files to my server? Or can I just link to them? Here are the two files.
[URL]
Also, currently the rotator moves too quickly. How can I slow it down? Here's the entire script.
I'm trying to do a simple image rotator without a plugin (they're not letting me use a plugin, but I don't need any transition effects, so it should be very simple w/o a plugin.
[Code]...
(I also would to find an approach that I can easily choose whether or not it should loop or not (stop at last photo or go back to the first photo..)
I just need something that rotates/slides a few images when a page loads. I'd guess Jquery would work best? But it needs to work in all browsers, and I have read some horror stories about ones that don't. Any good recommendations?
I have added an image rotator to my website using Java Script.The box for the rotator shows up on the published site but not the pictures.When I click on the box it links to the pictures I have added, and I know they are rotating because it changes every time I click on it.Also, the code does not seem to be showing up when I view the source of the page.
I launched the following scripts but only the "Auto Start Page Rotator" page appeared.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
im looking for an image rotator script with links, so every time the page is refreshed a new random image is displayed. The thing is, i need a script that doesnt have the location of the images in the script.I need a script like the current google adsense script, no advertisement links or locations are displayed.
I have installed an image rotator script on my page however the animation is not working i.e. the rotation between images is not taking place. The script works on my localhost though. code...
I did a search but didn't find this so if I missed the thread I apologize. I want to show 3 images with a link to the individual dog's page. The images are rotating just fine but none of them are clickable. I'm new to Javascript and took a simple image rotator script and then edited it.
I found on this site very good script for rotating images in table background.[code]However, it works perfectly only in IE, while it does not work in any other browser. I understood that problem is with document.getElementById.
I am working on building a website and have been looking for a jquery plugin with no luck. I am wanting something that doesn't show anything but the image. And then after X number of seconds, the image slides UP and the next image slides up from the bottom of the frame.
This is an example of the kind of plugin I'm after.[URL]
That one shows just the image and you can control speed, but it fades in/out. I just want it to slide up!
I'm new to java script and am desperately trying to understand it all. My first question is, I'm trying to create a "rotator" for my companies home page, much like the one on [URL]. And by rotators, I am referring the the deal that right underneath the nav bar that is rotating pics, etc. I found one I like at a different site as well, so I talked to the web developer and he graciously supplied me with the java script code for it. The code is fine, but when I place it in a document, it has the pics and text underneath each other instead if rotating the pics.
This here is a script that I've used in a few different sites, namely art/graphic/image-related sites. It's designed to rotate through banner ads, images, text, or anything else. I've tried to make it as easy to use as possible, so let me know what you think. Efficiency and functionality improvement suggestions are always welcome. =)
Documentation is available (http://www.skyzyx.com/scripts/messagecenter.php), and you can download the script with a demo page at the bottom of this post.
One thing that I built-in is a user's ability to stop the content from rotating (assuming the web designer makes the function available on his/her website), which helps to conform to the Web Content Accessibility Guidelines about "no or uncontrollable screen flickering".
/************************************* MESSAGE CENTER 5.1 (c) 2002-03, Ryan Parman http://www.skyzyx.com Distributed according to SkyGPL 2.1, http://www.skyzyx.com/license/ *************************************/
/************************************* Updated September 2, 2003
v5.1 - Added Next() and Previous(). Also added "aliases" for many functions to help a coder's logical naming style. Changed Resume() into an alias for Start(). Streamlined and optimized code for efficiency.
v5.0 - Completely rewrote this script from the ground-up to be object- oriented in nature. Implemented Algorithm's OO Timeouts. Functions include addMessage(), start(), pause(), resume(), and clear(). *************************************/ function messageCenter(zSpanID, zDelayMS) { // INITIALIZATION var spanid=zSpanID; var delay=(zDelayMS) ? zDelayMS:4000; var messageArray=new Array(); var count=0; var tOut=new Timer(this); var tOutRef, tOutRev; var prevAcct=0; var nextAcct=0;
// ADD A MESSAGE // The parameter must be an HTML or text string. this.addMessage=function(zMessage) { messageArray[messageArray.length]=zMessage; }
// START MESSAGE CENTER // Usually this will be called on the onload of the BODY tag. this.start=function() { if (document.getElementById) { document.getElementById(spanid).innerHTML=messageArray[count]; count++; if (count > (messageArray.length-1)) count=0; } tOut.clearTimeout(tOutRev); tOutRef=tOut.setTimeout("start", delay); nextAcct=0; prevAcct=0; }
// PAUSE FUNCTION // This will pause the Message Center. Optionally, passing a String parameter will display that string while paused. this.pause=function(stopMessage) { this.stopMsg=(stopMessage) ? stopMessage:null; tOut.clearTimeout(tOutRef); if (this.stopMsg) document.getElementById(spanid).innerHTML=this.stopMsg; }
// CLEAR FUNCTION // This will stop the Message Center, and clear the element's contents. this.clear=function() { tOut.clearTimeout(tOutRef); document.getElementById(spanid).innerHTML='' count=0; nextAcct=0; prevAcct=0; }
// NEXT FUNCTION // This will skip to the next message, and pause the Message Center. this.next=function() { if (nextAcct == 0) { nextAcct=1; prevAcct=1 } else if (nextAcct != 0) count++; if (count > (messageArray.length-1)) count=0; if (count < 0) count=messageArray.length-1; tOut.clearTimeout(tOutRef); document.getElementById(spanid).innerHTML=messageArray[count]; }
// PREVIOUS FUNCTION // This will skip to the previous message, and pause the Message Center. this.previous=function() { if (prevAcct == 0) { prevAcct=1; count-=2; nextAcct=1; } else if (prevAcct != 0) count--; if (count > (messageArray.length-1)) count=0; if (count < 0) count=messageArray.length-1; tOut.clearTimeout(tOutRef); document.getElementById(spanid).innerHTML=messageArray[count]; }
/************************************* Utilizes Algorithm's Timer Class for Object-Oriented timeouts http://www.undefined.net *************************************/ function Timer() { this.obj = (arguments.length)?arguments[0]:window; return this; }
Timer.prototype.setInterval = function(func, msec) { var i = Timer.getNew(); var t = Timer.buildCall(this.obj, i, arguments); Timer.set[i].timer = window.setInterval(t,msec); return i; }
Timer.prototype.setTimeout = function(func, msec) { var i = Timer.getNew(); Timer.buildCall(this.obj, i, arguments); Timer.set[i].timer = window.setTimeout("Timer.callOnce("+i+");",msec); return i; }
when I was trying to create the code which is posted below. it is a table of banner ads that will rotate on my website and the appropriate link follows the appropraite ad when they rotate. everything is working fine except that when you click on one of the ads ( which is a link), the link works but the page displays an error at the bottom as soon as any link is clicked.