Jump to content

prototype, div and onload


thewooleymammoth

Recommended Posts

Im using prototype and scriptaculous, I would like to have a div fade in on load... cant figure out how to do it.

 

someone on a nother forum i searched came up with this suggestion using jquery

  1.

      $("#divid").load(function() {

  2.

        alert("The div has been loaded.");

  3.

      });

can this be done somehow with prototype?

Link to comment
https://forums.phpfreaks.com/topic/187352-prototype-div-and-onload/
Share on other sites

 

can this be done somehow with prototype?

 

here is an example of prototype + scriptaculous

<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js"></script>
<script type="text/javascript" src="js/effects.js"></script>

<script type="text/javascript">
document.observe("dom:loaded", function() {
$("fadein").appear({ duration: 3.0 });
});
</script>


<div id="fadein" style="display:none">
This content is hidden when the page loads
</div>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.