ben-g
12/19/2016 - 2:32 PM

jQuery / Inserting content on a class after a specific class. Or removing it.

jQuery / Inserting content on a class after a specific class. Or removing it.

 <script type="text/javascript">
   jQuery(document).ready(function($) {

       if ( $('body').hasClass('parent-pageid-7') || $('body').hasClass('page-id-7') ) {
           $( '.menu-item-4705' ).remove();
       }

       if ( $('body').hasClass('page-id-3') ) {
           $( '#subpages-widget-3' ).remove();
       }
       if ( $('body').hasClass('page-template-default') ) {
           $('<div class="yellow"><span class="RI-button2"><a href="/request-information/">Request Information</a></div>').insertAfter(".footnote");
       } 
   });

</script>