NeoTech Administrator
Number of posts : 119 Age : 34 Location : BeYoND The gOdLiKE....xD Job/hobbies : xD....WebSItING,cHAttiNG Shoutout : PleaSe rEGistER to ouR foRUM......xD <b><font color=blue>Reputation</col : <b><font color=red>Violation</color : Registration date : 2008-08-26
| Subject: Make Primary Picture Dragable Fri Aug 29, 2008 10:36 am | |
| Just copy n paste this code inside your JS file: - Code:
-
$$('div.imgblock200')[0].makeDraggable();
If you want to find out why this single line of code work, click this link: http://tekfatliu.wordpress.com/2008/08/ … framework/ Because your primary picture is an image anchor, you shoud remove the href. So when you click n drag the picture it doesn't redirect you to the picture itself. Paste this complete code: - Code:
-
$$('div.imgblock200')[0].innerHTML = $$('div.imgblock200')[0].innerHTML.replace(/<a href(.+?)>/i,""); $$('div.imgblock200')[0].makeDraggable();
One more example, this time we will alert all the span tag who has q class ( ex: ) within content_6 id or moreabout box. We don't even have to made the getelementbyClassName function.
Just copy n paste this code inside your JS file: - Code:
-
$$('#content_6 span.q').each(function(el, i){alert(el.innerHTML+"--"+el.nextSibling.nextSibling.innerHTML);});
THNX^^ | |
|
breaker2
Number of posts : 137 Age : 29 Location : Sto. Nino,Meycauayan,Bulacan,PhiliPpInES Job/hobbies : Surfing Net,Design layout,DoTa Shoutout : =((........wawa tlga aq <b><font color=blue>Reputation</col : <b><font color=red>Violation</color : Registration date : 2008-08-29
| Subject: Re: Make Primary Picture Dragable Fri Aug 29, 2008 11:09 am | |
| | |
|