JavaScript - Coverflow-like Effect Does Not Display Correctly In Ie
The right most images are supposed to be visable and flip into view as the user scrolls. In IE, it's truncated and shoved over to the left. As you can see from the screenshot I attached, everything works fine in Moz.
I think this is the suspect bit of js: Code: //move out the images on the right, then delete the right most one var end = old + 4; if(end > this.getListLength()) end = this.getListLength(); for(var i = old + 1; i < end; i++) this.shiftOut(i, 'r', old, sel, end); var start = sel - 3; if(start < 0) start = 0; var lOffset = (this.containerWidth - 100 - this.widthOffset - 50) + ((old - sel) * 50); var zIndex = 500 - ((old - sel) * 50); var dur = this.chainDuration / 2; this.tiltAway(old, 'r', lOffset, zIndex, dur); var fn = function(){ Coverflow.center.apply(Coverflow, [sel, 'l', 1]); for(var i = start; i < sel; i++) Coverflow.shiftIn(i, 'l', old, sel); } setTimeout(fn, dur / 2); } else if(old < sel) { this.working = true; Here's the CSS: Code: #__cvfl-coverflow{ height: 560px; margin: auto; overflow: hidden; position: relative; width: 600px; } #__cvfl-coverflow-label{ color: #fff; font: 15pt Arial; line-height: 1.3em; position: relative; top: 238px; z-index: 700; margin-left:85px; margin-top:15px; } #__cvfl-coverflow-label a{ font-size:12pt; color:#0099FF; } #__cvfl-coverflow-holder{ width: 650px; background:#000000; } Here's the html: Code: <div id="coverflowHolder"> <div id="__cvfl-coverflow-holder"> <div id="__cvfl-coverflow"> <div id="__cvfl-coverflow-wrapper"></div> <div id="smallerPreview"></div> <div> <div id="__cvfl-coverflow-label"></div> </div> <!-- --> </div> </div> <div id="oldlist" style="display:none"></div> <SCRIPT type="text/javascript" src="coverflow.js"> </SCRIPT> <SCRIPT type="text/javascript"> var canvas_compatible = false; try { canvas_compatible = !!(document.createElement('canvas').getContext('2d')); } catch(e) {} if (canvas_compatible) document.getElementById("__cvfl-coverflow-holder").style.display=""; else document.getElementById("oldlist").style.display=""; </SCRIPT> I'm not sure what the problem is with IE. Any input would be great, thx. Similar Tutorialsi dont want to get anyone's hopes up but it has to do with cars
Hi, I have a question here. I have 2 videos and if I click the image which uses #usemap, it will switch to the specific videos I clicked. FF and chrome has no problem but only IE. The scenario is like this: Actual scenario is when the page load, it will display tab 1, video 1 and tab 2 is greyed out. If I clicked on tab 2, tab 1 is greyed out and video 2 is display. Both tabs I use #usemap. But now the problem in IE is that it keeps on displaying tab 1 and video 2 instead of video 1 and when I clicked tab 2, tab 2 is selected but no video is loaded. Below is a simple code which hope it can helps better understanding of what I'm trying to do: Code: <div> <img src="tab.jpg" id="tab1" #usemap="videotab"> <img src="tab.jpg" id="tab2" #usemap="videotab"> </div> <div id="video1" style="display:block"><"1st video source codes here"></div> <div id="video2" style="display:none"><"2nd video source codes here"></div> <map name="videotab"> <area href="" onclick="swapvideo(1); return false;" /> <area href="" onclick="swapvideo(2); return false;" /> </map> function swapvideo(num){ if (num == 1) { document.getElementById("video1").style.display = "block"; document.getElementById("video2").style.display = "none"; document.getElementById("tab1").style.display = "block"; document.getElementById("tab2").style.display = "none"; } else if (num == 2) { document.getElementById("video2").style.display = "block"; document.getElementById("video1").style.display = "none"; document.getElementById("tab2").style.display = "block"; document.getElementById("tab1").style.display = "none"; } } This is the brief code. IE just keep displaying video 2 when page load and video doesn't loads when tab 2 is clicked. Even if I program the 2 divs to be show, it only shows video 2 and video 1 is nowhere to be seen. And I tried taking out the video 2 codes, video 1 then can be seen. Hope you guys out there can understand what I'm trying to say. I really like the lightbox2 effect (http://www.huddletogether.com/projec...tbox2/#example) but I need help doing what I'm trying to do, for some reason I cannot get it to work, maybe you have a better recommendation? I have one large image, its a tear out of a magazine, I want the initial image to be the entire page, but I want the user to be able to click on the text area of the page and have that enlarge so the viewer can read it clearly. Any ideas? Thank you, Dustin Hey guys, I'm new to the forum and thought I should sign up to learn a little more. I am trying to work on a lightbox for my personal portfolio site which opens up numerous images in one lightbox that you can scroll through. However, I want thumbnails below the main image too. The following link shows exactly what I mean, just click on one of the images... http://www.weareunit.com/index.php?p=3D Thanks Hi friends, Im new with JS. How to make the roll over effect in JS. An image, on roll over, the big size of the same image needs to appear. regards anoop I want to add the the faded effect to the slide pics that I make them change by timer and I don't know how to add the faded effect and make it work on IE and Firefox.
Quick question, I need to get the hover effect that Templatemonster has, for example click here and hover over a template image see how you get that larger pop-up image that disappears instantly after you remove you mouse from the template thumbnail image. How would I get that effect? Thanks!!! Hi, Does anyone knows how to use this effect using javascript? http://www.modonline.com/ Really appreciate if someone can help me. Thank You, Nadun I need to have an image hyperlinked to a js function that fades text elswhere on the page. I imagine it looks something like <a href="(some js function or somethingrather"><img src="theimg.png"></a>, but how do I do it exactly? I would like code that I can just copy and paste in my header that is set to fade a specific line of text, and be able to hyperlink and image to initiate the js. Please help. Carson www.carsonkahn.com I am using ASP.NET and AJAX here. basically what I want is a nice little slide effect to show the next batch of images in a mini slide show. Example: << prev [image1] [image2] [image3] [image4] Next >> << prev [image5] [image6] [image7] [image8] Next >> so when the user presses next or previous, it will SLIDE to the left/right. the databinding is done at the server side end and in an update panel so it does an async postback when they press next/prev. how can I go about doing this type of effect? Greetings everyone; Jesse here. Long time reader, first time poster. I have a personal website, currently in development, located at: http://www.jesselang.ca If you click the right-facing arrows along the right side you'll open a side-bar column, clicking a left-facing arrow will then close the side-bar. This functionality is "OK" at best. What I would like to see is clicking the right-facing arrow causes the current sidebar to fade-in, and simultaneously have the arrow flip to a left-facing icon; the idea being to add a toggle function to the arrows. The code I'm using at the moment is shown below, this string works for me because it only allows 1 sidebar container to be displayed at a time... which is ideal. Code: <script type="text/javascript"> lastone='empty'; function showIt(lyr) {if (lastone!='empty') lastone.style.display='none'; lastone=document.getElementById(lyr); lastone.style.display='block';} </script> The respective html looks something like this: Code: <a onclick="javascript:showIt('interestcontainer')" class="arrow"><span>show interests sidebar</span></a> The coresponding html for the container to display looks like this. This code also shows the "hide container" button: Code: <div id="interestcontainer" style='display:none;'> <h4>interests<a onclick="interestcontainer.style.display='none';" class="back"><span>back</span></a></h4> And the CSS looks like this: Code: a.arrow{ display:block; float:right; background:url(../images/ico-arrow.gif) top no-repeat; text-decoration:none; overflow:hidden; width:13px; height:11px; margin-left:3px;} ------------------ Would it be asking to much to have someone help me achieve the following functionality? -load page with all side containers hidden -display only 1 side container at a time -fadein and fadeout effects -same button displays and hides -button swaps images for displat/hide commands Again, my code can be seen at: http://www.jesselang.ca http://jesselang.ca/files/style.css I'd very much appreciate the help. Thank you in advance. *j Hi, I have problem with javascript for image effects... Here is the LINK... login with theese nick and pass: nick: google pass: googleads the problem: When you log into, on the top of the page are 4 images with fade effect... But effect is wrong. When I came first I see those images in full collors. How to change my script to show them in grey when I first came? Thanks in advance... Help, I have a navigation menu that has a flyin effect for each item using Javascript. Right now, The Javascript flys in a picture (in the same location) no matter what item you hover over. How can I get it to fly into a different position for each item. Here is my code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>hello</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="jquery.js"></script> <script src="hoverIntent.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $("#nav a").append("<em></em>"); $("#nav a").hoverIntent(function () { $(this).find("em").animate({ opacity: "show", top: "-34" }, "fast"); var hoverText = $(this).attr("title"); $(this).find("em").text(hoverText); }, function () { $(this).find("em").animate({ opacity: "hide", top: "-43" }, "fast"); }); }); </script> <style type="text/css"> body { margin: 0px; } #nav { border-top: 2px solid #000; border-bottom:2px solid #000; width: 100%; height: 36px; line-height: 36px; float: left; background:url("images/OFF2.gif") repeat-x top left; } #nav ul { list-style: none; width: 900px; margin: 0 auto; padding: 0; position:relative; } #nav li { float: left; } #nav li em { background: url(images/home.png) no-repeat; width: 180px; height: 45px; position: absolute; top: -43px; left: 0px; padding: 20px 12px 10px; z-index: 1; display: none; } #nav li a { font-family:"Georgia", "Sans-Serif"; display: inline-block; text-decoration: none; font-size:medium; padding: 0px 5px; text-align:center; color: #000; width:110px; height: 36px; line-height: 36px; background:transparent url("images/off.gif") no-repeat top right; } #nav li a:hover { font-family:"Georgia", "Sans-Serif"; display: inline-block; text-decoration: none; font-weight:bold; font-size:medium; padding: 0px 5px; width:110px; height: 36px; line-height: 36px; } </style> </head> <body> <div id="nav"> <ul> <li><a href="#">Item1</a></li> <li><a href="#">Item2</a></li> <li><a href="#">Item3</a></li> <li><a href="#">Item4</a></li> </ul> </div> </body> </html> Thank you! Take a look at this guys excellent site. http://sursly.com/ Does anyone know of the coding he used to get his pages to load like they do (auto scrolling right) I would like to do this with a site I'm building but vertical. I was hoping someone may know of a tutorial or could help me out here on the forums. Thanks. Can some one help me step me through this last part of my script i have made. I have completed my entire chat program but currently i use: <meta http-equiv="refresh" content="5; URL=shout.php"> This is what keeps my chat room up to date, but this is pretty ugly due to the fact the browser makes a refresh. So i was hopeing some one could step my through to add ajax that makes a live affect with it appear to refresh. The script that has this chat is in the structure of: Code: <meta http-equiv="refresh" content="5; URL=shout.php"> <?php function get_chats(){ //query //while loop the logs out } getlogs(); ?> And thats it. I took a look on W3 about ajax and most of it was involve an event occuring such as submit/on key press which isn't what i want as some times a user may not do anything but i still want the chat to keep "up to date". I found one tutorial but it was over complicated to just take snippets out to put on my chat without knowing what it did or what to change for my chat to make it to work. Hope you can help - im a quick learner when i see the right example of what i need. Hi Guys, I hope this is a good place for me to post a question. I saw some responses referring to this and I hope as a newcomer my question is not booed! :) I am attempting to compound a rollover effect I have currently working at this page. The 4 numbered buttons make the larger image next to it change upon on roll over. I would like the buttons themselves also to have a rollover state. In my code below, I simply added a space in my JS script after the portion of the script that I know is working ends and added the newer code referring to 71, or rollimg71 (an arbitrary number). The area that says //button rollover effect is the code I added that does not break the site but does not work correctly. My JS <code> // JavaScript Document //gallery rollover effect if (document.images) { image0 = new Image; image1 = new Image; image2 = new Image; image3 = new Image; image0.src = 'ectonymimages/newsletter1.jpg'; image1.src = 'ectonymimages/newsletter2.jpg'; image2.src = 'ectonymimages/newsletter3.jpg'; image3.src = 'ectonymimages/newsletter4.jpg'; } else { image0 = ''; image1 = ''; image2 = ''; image3 = ''; document.rollimg = ''; } //button rollover effect if (document.images) { image71a = new Image; image71b = new Image; image71a.src = 'ectonymimages/newsletter1_link.gif'; image71b.src = 'ectonymimages/newsletter1_linkselected.gif'; } else { image71a = ''; image71b = ''; document.rollimg71 = ''; } </code> My HTML <code> <div style="float:left; padding:10px 0 0 25px;"> <span onmouseover="document.rollimg.src=image0.src;" onmouseover="document.rollimg71.src=image71b.src;" onmouseout="document.rollimg71.src=image71a.src;"><img src="ectonymimages/newsletter1_link.gif" alt="Newsletter 1 Button" name="rollimg71"/></span> <br /><br /><br /> <span onmouseover="document.rollimg.src=image1.src;"><img src="ectonymimages/newsletter2_link.gif" alt="Newsletter 2 Button" /></span> <br /><br /><br /> <span onmouseover="document.rollimg.src=image2.src;"><img src="ectonymimages/newsletter3_link.gif" alt="Newsletter 3 Button" /></span> <br /><br /><br /> <span onmouseover="document.rollimg.src=image3.src;"><img src="ectonymimages/newsletter4_link.gif" alt="Newsletter 4 Button" /></span> </div> <div style="float:right; padding-right:50px;"> <img src="ectonymimages/newsletter1.jpg" align="Newsletter Example" name="rollimg"/> </div> </code> Right now, my HTML only attempts to affect the first button, but I hope to have it affecting all 4 buttons. (Presumably if I keep this same format, they would be rollimg72, rollimg73, and rollimg74 added somewhere in the JS) Further, I'll also compound an onclick function, for both the buttons and the larger images, that will open a pop up HTML window. So, my priorities are that I'd love for the buttons themselves to have a rollover effect and then also an onclick function that opens a link in a new window in addition to the rollover effect currently being used. *If I mouse over a numbered button, that numbered button changes. *If I mouse over a numbered button, depending on the numbered button doing the affecting, a larger image is displayed next to it that changes on rollover. (This step already works correctly.) *If I click on a numbered button, 1 of 4 links would open. If I click on the larger image that changes, 1 of 4 links would open. If you've read this far, thank you in advance! Heh heh, this is the 2nd time I've typed this, as the forum logged me out and deleted my entire post when I clicked "preview". Any help is much appreciated! Gentlepeople, I ask your assistance. -Marcus Hi, I'm kind of new to javascript and am an undergraduate studying a FdSc in web tech which encompasses all of these kind of languages (PHP, Python, HTML, CSS, Javascript and so on). Javascript is the one that I'm focusing on first and whilst I have a solid understanding of the mark up languages I'm struggling to combine the two. For the simple stuff like like the theory behind variables, functions and so on it's not a problem, but what is a problem is duplicating this kind of effect as seen on www.yidio.com The feature with the vertical menu that changes when you hover over a TV show name which then changes the content (i.e. the image and text - essentialy the HTML content) is bloody neat in my opinion and I'd like to be able to re-create it. I've also noticed the same effect is in place on the boxes at www.ebuyer.com and on the story navigation menu at www.sciencedaily.com. How can I do this? I have all the HTML and CSS source code in place but just no javascript. I've approached my lecturers about it and they've told me about jquery and javascript libraries but this still doesn't help me in being able to achieve this effect. would someone be able to explain and help me? Thanks Nick C Hey I'm trying to make a slot machine effect in JS - i had an ajax example but was far too complicated to manipulate to communicate with my server so im working from ground up. The way ive done it is simple html and a submit button. But i want the submit button to first create a "rolling through the images" affect like a slot machine does - then stop left to right in that order (basically like a slot machine does). Now this is beyond what i know in JS but i then also want it to know the result of the images store them into an array and push it to my PHP so i can process it on my server. Is this even possible ? And has any one ever tried such a thing because im stuck but really wish to make this for my gaming website. Hope you can help! Gljpartners.com this site has a interesting scrolling feature. for the images.. does anyone know how it's done? |