Appfuse's global.js has a good function that I want to use in my project.
It's the highlightFormElements() function.
Since the appfuse use prototype and script.aculo, but I want to use jQuery only, so I need to change the original global.js.
On http://15daysofjquery.com/quicker/4/, you can find how to use another approach to replace the window.onload():
$(document).ready(
function
(){
//
Your code here...
});
so, I just simple use this way to like below:
jQuery(document).ready(function()
{
highlightFormElements();
}
);
And that's all for my Step 1.
It's the highlightFormElements() function.
Since the appfuse use prototype and script.aculo, but I want to use jQuery only, so I need to change the original global.js.
Step 1:
since currently I only need the highlightFormElements() function, so it's very easy,On http://15daysofjquery.com/quicker/4/, you can find how to use another approach to replace the window.onload():
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/a41954a27d6ad96fa2c2cf816e677448.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6a9c071a08f1dae2d3e1c512000eef41.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/0196c3df5ea9e936f21e9932cca91014.gif)
And that's all for my Step 1.