locked
Hide a ECB Menu Item using Content Editor Web Part RRS feed

  • Question

  • Hi,

    We have a functionality to show the versions in another custom page and we need to hide the default "Version History" option in ECB menu. This functionality has to be achieved using content editor web part.

    Kindly let me know the JavaScript function that has to be added in the content editor web part.

    Thanks

    Monday, July 9, 2012 6:47 AM

Answers

  • Hi Jain,

    Based on your description, there is a sample of hiding the Edit in Microsoft InfoPath menu using content editor web part.

    Please refer to: http://www.jdxyw.com/?p=534

                           http://blogs.msdn.com/b/bowerm/archive/2004/07/07/175691.aspx

    Best Regards.

    Monday, July 9, 2012 8:56 AM
    Moderator
  • try this code, works for me on SP2010:

    <script type="text/javascript">
     
    $(document).ready(function(){
      $('.ms-MenuUIULItemHover').live('mouseover',function() {         
    
     $("#ID_Versions").parents('.ms-MenuUIULLink').eq(0).hide();
     
             }); 
    
        });
    
    </script>
    Pls mark as answer if it works for you. Hope it helps!

    Tuesday, July 10, 2012 9:48 AM

All replies