I have a custom page named mywallet.phtml. I have a button named named mywallet. I want to preview the custom page when i hover the mouse on mywallet. What do i need to do? I am new to magento. thanks This is my code for the button

          <li  <?php echo strpos($magentoCurrentUrl,'mywallet')? "class=current":"";?>>         
                <?php if(strpos($magentoCurrentUrl,'mywallet')){ ?>     
                    <strong><?php echo $helper->__('My Wallet') ?></strong> 
                    <?php }                 
                    else{ ?>                    
                        <a href="<?php echo $this->getUrl('marketplace/marketplaceaccount/mywallet'); ?>">
                            <?php echo $helper->__('My Wallet') ?>
                    <?php } ?>          

1 Answer 1


Here is what you can do

  1. Call this .phtml file to display html as usual using layouts and xml
  2. hide this html initially by setting visibility hidden call main container div as 'mywalletcontentdiv'
  3. add using css class to this div

    .hidden{ visibility: hidden;

  4. Write jquery/javascript to display


Hope this helps!!!

  • which file to write the javascript? I am confused about it on magento. I can do it in php and html. but with magento i am confused. thanks
    – noob
    Feb 2, 2015 at 23:57
  • you can write in any js file which or write a script block in from where your header is called. make sure you put it in document.ready function. if you could help with url i might able to give you specific js file name or place. Feb 3, 2015 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.