简体   繁体   中英

Magento - Display element on page load using scriptaculous and prototype

I have an element in my product list page that I want to hide until the rest of the document has finished loading. (it's a list item with the class "hideme") The JS solution doesn't work for me, so I'm looking for a scriptaculous method, which should work better in Magento. Any help would be greatly appreciated. Thanks!

If you want to make something client-side once the DOM has been loaded, you should try with this: document.observe("dom:loaded", function() { // initially hide all containers for tab content $$('div.tabcontent').invoke('hide'); });

Is more like jQuery(document).ready();

Greetings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM