|
 |
|
รบกวนถามเรื่องทำเมนูจากโค๊ดจาวาครับ ผมมี สคริปจาวา นามสกุล .js รายละเอียดโค๊ดดังนี้นะครับ |
|
 |
|
|
 |
 |
|
ผมมี สคริปจาวา นามสกุล .js รายละเอียดโค๊ดดังนี้นะครับ
var SlideList = new Class({
initialize: function(menu, options) {
this.setOptions(this.getOptions(), options);
this.menu = $(menu), this.current = this.menu.getElement('li.current');
this.menu.getElements('li').each(function(item){
item.addEvent('mouseover', function(){ this.moveBg(item); }.bind(this));
item.addEvent('mouseout', function(){ this.moveBg(this.current); }.bind(this));
item.addEvent('click', function(event){ this.clickItem(event, item); }.bind(this));
}.bind(this));
this.back = new Element('li').addClass('background').adopt(new Element('div').addClass('left')).injectInside(this.menu);
this.back.fx = this.back.effects(this.options);
if(this.current) this.setCurrent(this.current);
},
setCurrent: function(el, effect){
this.back.setStyles({left: (el.offsetLeft)+'px', width: (el.offsetWidth)+'px'});
(effect) ? this.back.effect('opacity').set(0).start(1) : this.back.setOpacity(1);
this.current = el;
},
getOptions: function(){
return {
transition: Fx.Transitions.sineInOut,
duration: 500, wait: false,
onClick: Class.empty
};
},
clickItem: function(event, item) {
if(!this.current) this.setCurrent(item, true);
this.current = item;
this.options.onClick(new Event(event), item);
},
moveBg: function(to) {
if(!this.current) return;
this.back.fx.custom({
left: [this.back.offsetLeft, to.offsetLeft],
width: [this.back.offsetWidth, to.offsetWidth]
});
}
});
SlideList.implement(new Options);
จบโค๊ดจาว่า
ผมต้องการทำเมนูนะครับ
โดยมีโค๊ตดังนี้ครับ
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table width="100%" border="1">
<tr>
<td width="34%"><div align="center"><a href="http://www.#">MainMenu</a></div></td>
<td width="26%"><div align="center"><a href="http://www.#">Chat</a></div></td>
<td width="40%"><div align="center"><a href="http://www.#">Webboard</a></div></td>
</tr>
</table>
</body>
</html>
ผมจะเรียกใช้งายอย่างไรดีครับ ช่วยผมด้วยครับ คืออยากได้เมนูเป้นจาวาอ่ะ
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-10-26 14:04:40 |
By :
pkoaloy2005 |
View :
1294 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
|
|

|
Load balance : Server 02
|