»
EnglishFrenchVietnamese

Print - Fade Anything Technique - JavaScriptBank.com

Full version: jsB@nk » Background » Fade Anything Technique
URL: https://www.javascriptbank.com/fade-anything-technique.html

Fade Anything Technique © JavaScriptBank.comNeed to draw attention to something new on your Web page? Only need to show it for a moment or two? This JavaScript will highlight it in a subtle manner (or boldly, if you choose).

Full version: jsB@nk » Background » Fade Anything Technique
URL: https://www.javascriptbank.com/fade-anything-technique.html



JavaScript
<script language=javascript>/*    xxxxxxxxxxxxxxx   xxxxxxxxxxx     xxxx    xxxxxxxxxxxxxxx  xxxxxxxxxxxxx    xxxx    xxxxxxxxxxxxxxx  xxxxxxxxxxxxx    xxxx         xxxxx       xxxxxxxxxxxx     xxxx         xxxxx       xxxxx  xxxx         xxxxx xxxxxxxxxxxx  xxxx         xxxxx xxxxxxxxxxxxx  xxxxxxxxxxxwww.JavaScriptBank.com         xxxxx  xxxxxxxxxxxx  xxxxxxxxxxxxx         xxxxx        xxxxx  xxxx     xxxx   xxx   xxxxx  xxxxxxxxxxxx    xxxx     xxxx   xxx  xxxxxx xxxxxxxxxxxxx  xxxx     xxxx   xxxxxxxxxx xxxxxxxxxxxxx  xxxxxxxxxxxxx    xxxxxxxx  xxxxxxxxxxx      xxxxxxxxxxx        Rating star scriptAuthor: Thái Cao PhongWebsite: www.JavaScriptBank.comPlease keep these comments above to contact author when you use this script. Thank you very much.Vietnamese: Xin ban hay giu lai nhung thong tin tren de nguoi khac co the lien he voi tac gia neu ban co su dung doan ma nay. Cam on ban rat nhieu.*/var ie = navigator.appName=='Microsoft Internet Explorer'?true:false,op = window.opera?true:false,ns = navigator.vendor?true:false;var starPath = '';function rate(evt){var obj = getObject(evt);if(obj.className != 'jsbank_rate_item')return;var w = event.offsetX;var disp_mark = document.getElementById('jsbank_disp_mark');if(w>135 && w<=150){obj.src = starPath + '5.0.gif';disp_mark.innerText = '5';}else if(w>120 && w<=135){obj.src = starPath + '4.5.gif';disp_mark.innerText = '4.5';}else if(w>105 && w<=120){obj.src = starPath + '4.0.gif';disp_mark.innerText = '4';}else if(w>90 && w<=105){obj.src = starPath + '3.5.gif';disp_mark.innerText = '3.5';}else if(w>75 && w<=90){obj.src = starPath + '3.0.gif';disp_mark.innerText = '3';}else if(w>60 && w<=75){obj.src = starPath + '2.5.gif';disp_mark.innerText = '2.5';}else if(w>45 && w<=60){obj.src = starPath + '2.0.gif';disp_mark.innerText = '2';}else if(w>30 && w<=45){obj.src = starPath + '1.5.gif';disp_mark.innerText = '1.5';}else if(w>15 && w<=30){obj.src = starPath + '1.0.gif';disp_mark.innerText = '1';}else{obj.src = starPath + '0.5.gif';disp_mark.innerText = '0.5';}}///////////////////////////////////////////////////////////////////////////////// getObject function///////////////////////////////////////////////////////////////////////////////function getObject(evt){var srcElem;if(ie){srcElem = event.srcElement;}else{srcElem = evt.target;}return srcElem;}document.onmousemove = rate;</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<img align=absmiddle src='notRated.gif' class=jsbank_rate_item onclick=vote() style="cursor: hand;" /><br /><span id=jsbank_disp_mark></span><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/utility/Rating_Star_Script/Rating_Star_Script.zip