Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Default

Java Script ????????

Recommended Posts

Galeraaaaaaa

 

Uma dúvida isso é JavaScript? Como se faz....Ao passar o Mouse sobre o Link Aparece a descrição em outro lugora, deem uma olhada.

 

http://www.k10k.net/

 

 

Se alguem souber puder ajudar...

 

Agradeço antecipadamente

 

[]'s

Compartilhar este post


Link para o post
Compartilhar em outros sites

Se você se refere aquele item la no topo, quandovc coloca o mouse sobre o botao e aparece a descrição abaixo e no canto esquerdo, entao deve ser esse codigo ai, veja que ha um arquivo em .js, deve ir no site e pegar

 

<script language="JavaScript" src="http://www.k10k.net/scripts/k10k.js" type="text/javascript"></script>

 

<!--specific js functions for this page -->

<script language="JavaScript" type="text/javascript"><!--

 

// GRABS THE BROWSER NAME

browserNaming();

 

// COOKIE VARS

customSize = 'large';

customTempSize = '';

isSmall = 0;

linkSettings = 'off';

linkTempSettings = '';

 

// NEWSLETTER VAR

newslettervalue = 'sub';

newRan = 29;

 

// ANIMATED MENU VARS

delay = 70;

imgs = new Array();

counter = new Array();

peelingup = new Array();

peelingdown = new Array();

oldsection = 'front';

currentsection = 'front';

lastover = '';

 

// MENUTEXT VARS

textfront = 'Kaliber Frontpage - A yummy grabbag o\' design goodies';

textissues = 'Kaliber Issues - Tasty treats in all shapes and forms';

textnews = 'Kaliber News - PDA + XML options now available!';

textspecials = 'Kaliber Specials - Bitesize nuggets of fun!';

textstore = 'Kaliber Store - Good vibes always on sale!';

textfaq = 'FAQs - Everything you need to know';

textnewsletter = 'Newsletter - Sign me up, Scotty!';

textcontact = 'Contact - No robots in here!';

textcustomize = 'Customize - Change the frontpage size + link colors';

textexpand = 'Resize - Set browser window to K10k friendly size';

 

// SETS THE COUNTER FOR THE MENUS, PEELS THEM UP

counter['front'] = 1;

counter['issues'] = 1;

counter['news'] = 1;

counter['specials'] = 1;

counter['store'] = 1;

peelingup['front'] = 1;

peelingup['issues'] = 1;

peelingup['news'] = 1;

peelingup['specials'] = 1;

peelingup['store'] = 1;

 

// CHECKS THE INITIAL SECTION

if (currentsection) {

peelingup[currentsection] = 0;

peelingdown[currentsection] = 1;

}

 

// PRELOADS IMAGES

loadingFlag = true;

 

// form buttons

createObject('btnclosemenuoff','/images/buttondom/closemenu.gif');

createObject('btnclosemenuon','/images/buttondom/closemenu_on.gif');

createObject('btnsubmitmenuoff','/images/buttondom/submitmenu.gif');

createObject('btnsubmitmenuon','/images/buttondom/submitmenu_on.gif');

 

// sponsor logo

createObject('mtlogooff','/images/menu/sponsorstext/mtlogo_off.gif');

createObject('mtlogoon','/images/menu/sponsorstext/mtlogo_on.gif');

createObject('adlogooff','/images/menu/sponsorstext/adlogo_off.gif');

createObject('adlogoon','/images/menu/sponsorstext/adlogo_on.gif');

 

// form elements

createObject('radiooff','/images/menu/formstuff/radio_off.gif');

createObject('radioon','/images/menu/formstuff/radio_on.gif');

createObject('checkoff','/images/menu/formstuff/check_off.gif');

createObject('checkon','/images/menu/formstuff/check_on.gif');

 

// non-animated icons

createObject('contactoff','/images/menu/icons_static/contact_off.gif');

createObject('contacton','/images/menu/icons_static/contact_on.gif');

createObject('contactclick','/images/menu/icons_static/contact_click.gif');

createObject('customizeoff','/images/menu/icons_static/customize_off.gif');

createObject('customizeon','/images/menu/icons_static/customize_on.gif');

createObject('customizeclick','/images/menu/icons_static/customize_click.gif');

createObject('expandoff','/images/menu/icons_static/expand_off.gif');

createObject('expandon','/images/menu/icons_static/expand_on.gif');

createObject('faqoff','/images/menu/icons_static/faq_off.gif');

createObject('faqon','/images/menu/icons_static/faq_on.gif');

createObject('faqclick','/images/menu/icons_static/faq_click.gif');

createObject('newsletteroff','/images/menu/icons_static/newsletter_off.gif');

createObject('newsletteron','/images/menu/icons_static/newsletter_on.gif');

createObject('newsletterclick','/images/menu/icons_static/newsletter_click.gif');

 

loadingFlag = false;

preloadFlag = true;

 

// THINGS TO DO AFTER THE PAGE LOADS

function initPage() {

 

// show all section buttons

show('front');

show('issues');

show('news');

show('specials');

show('store');

 

// set up newsletter + customize

show('newsletterback');

show('customizeback');

changeImage(null,'radio'+customSize,'radioon');

customTempSize = customSize;

if (linkSettings != 'off') {

changeImage(null,'check'+linkSettings,'checkon');

}

linkTempSettings = linkSettings;

 

// sets the starting section

if (checkSection(currentsection)) {

clipMover(currentsection,7);

counter[currentsection] = 7;

}

else {

changeImage(null,currentsection,currentsection+'click');

}

 

// removes the link boxes in IE

getLinksToBlur();

 

// mac OS X display problem fix

fix_OSX_IE_DisplayBug();

 

}

 

 

// CHECKS FOR STATIC OR ANIMATED SECTION

function checkSection(thisSection) {

if ((thisSection != 'faq') && (thisSection != 'newsletter') && (thisSection != 'contact') && (thisSection != 'customize')) {

return true;

}

else {

return false;

}

}

 

// NON-ANIMATED ICONS

function noAniMouseover(id,param) {

if (preloadFlag) {

if (currentsection != id) {

changeImage(null,id,id+param);

}

}

}

 

// RESIZES BROWSER WINDOW

function resizeK10k(noAlert) {

if ((customSize == 'small') && ((currentsection == 'front') || (currentsection == 'customize'))) {

resizeBrowser(605,582);

} else {

if (self.screen.height > 870) {

resizeBrowser(1007,708);

} else {

resizeBrowser(1007,582);

}

}

}

 

// THE ISSUE DROPDOWN

function issueWarp(dropdown) {

var URL = dropdown.options[dropdown.selectedIndex].value;

if(URL != "") {

top.section.location.href='/issues/issuewarp.asp?IssueID='+URL;

setsection('issues');

}

}

 

// LOADS THE FRONTPAGE

function loadFront() {

top.section.location.href = '/pages/front/'+customSize+'.aspx?customSize='+customSize+'&linkSettings='+linkSettings;

if (isSmall) {

top.k10kbot.location.href = '/pages/bottom.aspx?customSize=small';

} else {

top.k10kbot.location.href = '/pages/bottom.aspx?customSize=large';

}

}

 

// HANDLES THE NEWSLETTER SUBSCRIBE/UNSUBSCRIBE

function newsletterSubmit(newsletterForm) {

var sValue = document.forms['newsletterForm'].Email.value;

if ((sValue.indexOf("@") == -1) || (sValue == "") || (sValue == "user@domain.com")) {

alert("Please enter a real email address!");

return false;

}

else {

top.k10kbot.location.href='/pages/bottom.aspx?Action='+newslettervalue+'&Email='+sValue;

document.forms['newsletterForm'].Email.blur();

hide('newsletterforms');

slide('newsletterback','29','77','newsletterforms','away');

document.forms['newsletterForm'].Email.value = 'user@domain.com';

}

}

 

// HANDLES THE CUSTOMIZE & NEWSLETTER FAKE-FORM SWITCHING

function fakeFormSwitcher(id,name) {

if (id == 'size') {

if (name != customTempSize) {

changeImage(null,'radio'+customTempSize,'radiooff');

changeImage(null,'radio'+name,'radioon');

customTempSize = name;

}

} else if (id == 'linkSettings') {

if (name != linkTempSettings) {

if (linkTempSettings != 'off') {

changeImage(null,'check'+linkTempSettings,'checkoff');

}

changeImage(null,'check'+name,'checkon');

linkTempSettings = name;

} else {

changeImage(null,'check'+name,'checkoff');

linkTempSettings = 'off';

}

} else if (id == 'newsletter') {

if (newslettervalue != name) {

changeImage(null,'radiosub','radiooff');

changeImage(null,'radiounsub','radiooff');

changeImage(null,'radio'+name,'radioon');

newslettervalue = name;

}

}

}

 

// SETS THE CUSTOMIZE COOKIE

function customizeSubmit() {

if ((customTempSize != customSize) || (linkSettings != linkTempSettings)) {

if (customTempSize == 'small') {

hide('issuedrop');

show('menubackhide');

} else {

hide('menubackhide');

show('issuedrop');

}

customSize = customTempSize;

linkSettings = linkTempSettings;

loadFront();

resizeK10k(true);

}

hide('customizeforms');

slide('customizeback','29','77','customizeforms','away');

}

 

 

// MENU TEXT FUNCTIONS

// For more info check out http://www.bosrup.com/web/overlib/

var textLayerHtml;

var dontShowTextLayer = 1;

var showTimer = null;

 

function menuTextOn(thisSection) {

if (browserName != "Opera") {

thisText = eval('text' + thisSection);

if (thisSection == currentsection) { textLayerHtml = "<span class=\"menusml\">You are here. Oh, well, you probably are ...</span>"; }

else { textLayerHtml = "<span class=\"menusml\">"+thisText+"</span>"; }

rewriteTextLayer(textLayerHtml, 'botoverdiv');

hide('bottextoff');

window.clearTimeout(showTimer);

dontShowTextLayer = 1;

show('botoverdiv');

self.status = '.: ' + eval('text' + thisSection) + ' :.';

}

}

 

function rewriteTextLayer(txt, id) {

txt += "\n";

// NS6

if (browserNew && browserName == "NS") {

botOver = document.getElementById(id);

range = document.createRange();

range.setStartBefore(botOver);

domfrag = range.createContextualFragment(txt);

while (botOver.hasChildNodes()) {

botOver.removeChild(botOver.lastChild);

}

botOver.appendChild(domfrag);

}

// IE 4+

else {

document.all[id].innerHTML = txt;

}

}

 

function menuTextOff() {

if (browserName != "Opera") {

dontShowTextLayer = 0;

hide('botoverdiv');

self.status = '';

showTimer = setTimeout("showNormalBottom()", 3000);

}

}

 

function showNormalBottom() {

if (dontShowTextLayer == 0) {

show('bottextoff');

}

}

 

 

// MENU ANIMATION FUNCTIONS

function clipMover(section,num) {

newTop = 37 - (num * 18);

if (browserNew) {

obj = document.getElementById(section);

obj.style.top = newTop+"px";

} else {

obj = document.all[section].style;

obj.top = newTop+"px";

}

}

 

function startpeelup(section) {

if (section != currentsection) {

startpeeldown(lastover);

lastover = section;

peelingup[section] = 1;

peelingdown[section] = 0;

peelup(section);

}

}

 

function startpeeldown(section) {

if (section != currentsection) {

peelingdown[section] = 1;

peelingup[section] = 0;

peeldown(section);

}

}

 

function peelup(section) {

if (section != currentsection) {

if (! peelingdown[section]) {

if (counter[section] < 8) {

clipMover(section,counter[section]);

if (counter[section] < 7) {

counter[section] = counter[section] + 1;

setTimeout("peelup('" + section + "')",delay);

}

}

}

}

}

 

function peeldown(section) {

if (section != currentsection) {

if (! peelingup[section]) {

if (counter[section] > -1) {

clipMover(section,counter[section]);

if (counter[section] > 0) {

counter[section] = counter[section] - 1;

setTimeout("peeldown('" + section + "')",delay);

}

}

}

}

}

 

function setsection(section) {

if (preloadFlag) {

if (section != currentsection) {

oldsection = currentsection;

currentsection = section;

if (browserName != "Opera") {

rewriteTextLayer('<span class=\'menusml\'>'+eval('text' + section)+'</span>', 'bottextoff');

}

hide('botoverdiv');

show('bottextoff');

if (checkSection(oldsection)) {

startpeeldown(oldsection);

} else {

changeImage(null,oldsection,oldsection + 'off');

}

if (checkSection(section)) {

clipMover(section,7);

} else {

changeImage(null,section,section + 'click');

}

if (((section == 'front') || (section == 'customize') || ((section == 'newsletter') && (oldsection == 'front'))) && (customSize == 'small')) {

if (isSmall == 0) {

move('newsletterback','208px','77px',false);

move('newsletterforms','220px','38px',false);

move('customizeback','208px','77px',false);

move('customizeforms','221px','38px',false);

hide('issuedrop');

show('menubackhide');

resizeK10k(true);

isSmall = 1;

}

}

else {

if (isSmall == 1) {

move('newsletterback','344px','77px',false);

move('newsletterforms','357px','38px',false);

move('customizeback','344px','77px',false);

move('customizeforms','357px','38px',false);

hide('menubackhide');

show('issuedrop');

top.k10kbot.location.href = '/pages/bottom.aspx?customSize=large';

resizeK10k(true);

isSmall = 0;

}

}

if ((section == 'front') || (section == 'customize') || ((section == 'newsletter') && (oldsection == 'front'))) {

hide('custbutton');

} else {

show('custbutton');

}

}

}

}

 

 

// SLIDING FUNCTIONS

function slide(id,endPos,startPos,layerToShow, dir) {

thisId = id;

thisEndPos = endPos;

thisStartPos = startPos;

thisLayerToShow = layerToShow;

thisDir = dir;

if (browserNew) {

block = document.getElementById(thisId);

block.ypos = parseInt(getIdProperty(id, "top"));

block.xpos = parseInt(getIdProperty(id, "left"));

} else {

block = document.all[thisId].style;

block.ypos = parseInt(block.top);

block.xpos = parseInt(block.left);

}

if (dir == 'in') {

if (block.ypos > thisEndPos) {

move(id,block.xpos+'px',(block.ypos-4)+'px',false);

setTimeout("slide(thisId,thisEndPos,thisStartPos,thisLayerToShow,thisDir);",30);

}

else if (block.ypos == thisEndPos) {

show(layerToShow);

}

} else if (dir == 'away') {

if (block.ypos < startPos) {

move(id,block.xpos+'px',(block.ypos+4)+'px',false);

setTimeout("slide(thisId,thisEndPos,thisStartPos,thisLayerToShow,thisDir);",30);

}

else if (block.ypos == startPos) {

setsection(oldsection);

}

}

}

 

// -->

</script>

 

 

Era isso que, você desejava saber?

 

[]s

Rodney

Compartilhar este post


Link para o post
Compartilhar em outros sites

Bem isso é bem simples

 

coloque um div onde você quer que apareça a descrição assim ó:

 

<div id="descricao"></div>

 

(ele tem que ter o id)

 

Depois nos links coloque assim

 

<a href="#" onmouseover="document.getElementById('descricao').innerHTML='Texto que vai aparecer no lugar'"> Link 1 </a>

 

[]'s

http://forum.imasters.com.br/public/style_emoticons/default/ninja.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.