Blog > detail

Just my tiny mind

Slide HTML Title with JavaScript

26-2-2012 Admin General 2 Comments

Slide HTML Title with JavaScript

Slide HTML Title with JavaScript is a simple Javascript function that made for slide your HTML title. So, when your script opened by browser, the title will slide.


Slide HTML Title with JavaScript only need JavaScript code, it even dont need HTML title tag to be edited.


The script :


message = "Website Title Here";//set your title here

position = 0;

delay = 500;//in millisecond

function slide_title() {

document.title = message.substring(position, message.length) + message.substring(0, position); position++;

if (position > message.length) position = 0

}

window.setInterval("slide_title()",delay);


Just copy the above script into your HTML page inside script tag, then the code should be working.


Hope this Slide HTML Title with JavaScript can be usefull for you

Slide HTML Title with JavaScript

Slide <a href=HTML Title with JavaScript" width="1" height="1" />

word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word

Slide HTML Title with JavaScript

Slide HTML Title with JavaScript

Slide HTML Title with JavaScript