So I want to move all JavaScript events (onmouseover, onclick, onfocus, onblur, etc) out of the XHTML code and in to a separate JavaScript "includes file" to be included after it's associated script library.
That way whether a DHTML library is not included, is included, and regardless of which one is included it's associated functions includes will execute the scripts. All the elements will have id attributes and unique values of course.
My first question: can one call a function from one script includes file from another or will I have to merge all of the script functions for my page on to the main DHTML engines themselves?
Secondly I've obviously have to remove the code from my XHTML. So here are a couple examples I'm trying to figure out...
jQuery - H1 Element (id="h1")
Code: Select all
<h1 onclick="$('#div01').BlindToggleVertically(1000, null, 'bounceout');return false;"Code: Select all
<h2 onclick="new Effect.toggle($('div02'),'blind');"Code: Select all
function h1()
{
if(h1.getElementsByTagName("header1"))
{
$('#div01').BlindToggleVertically(1000, null, 'bounceout');
}
}