Aqua-Soft Forums: Adding javascript to a page - Aqua-Soft Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Adding javascript to a page Rate Topic: -----

#1 User is offline   mike868y Icon

  • Group: Member
  • Posts: 141
  • Joined: 16-March 07

Posted 16 April 2008 - 12:31 PM

I am trying to add the mooflow javascript (http://www.outcut.de/MooFlow/) to a standard html page. How would i go about doing this?
0

#2 User is offline   Narfmaster Icon

  • Group: Member
  • Posts: 140
  • Joined: 08-February 08

Posted 16 April 2008 - 04:53 PM

What I usually do with mootools or any other javascript library-based system is to look at the source code of the website, copy the section required and then reverse engineer it.

In this case, MooFlow is simply using different
s in sequence within another div with an id "MooFlow". Simplified would be:

<div id="MooFlow">

	<div><img src="img/img1.jpg" title="Whatever" alt="Whatever" /></div>

	<div><img src="img/img2.jpg" title="Whatever" alt="Whatever" /></div>

</div>


It will use the MooTools id tag to pick up on which section to apply the javascript, although it looks like you can change the ID name in the settings you apply beforehand within one of the <script> tags in the header.
0

#3 User is offline   mike868y Icon

  • Group: Member
  • Posts: 141
  • Joined: 16-March 07

Posted 16 April 2008 - 06:34 PM

thanks for the help. I am a newb with hand coding javascript, so this is a huge help. however, what if i load too css style sheets? Will the div's automatically pull from the mooflow css?
0

#4 User is offline   Narfmaster Icon

  • Group: Member
  • Posts: 140
  • Joined: 08-February 08

Posted 19 April 2008 - 10:04 PM

I assume in the download or whatever it has it's own css, the only thing to worry about is if your main style sheet conflicts with the script's. Doubt this would happen but it's worth double checking id and class names to make sure nothing is the same.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic