Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- ( function( $ ) {
- $( document ).ready( function() {
- function set_menu_attributes( el, location ) {
- var links = el.find( 'a' );
- links.each( function() {
- $( this ).attr( 'data-type', 'link' ).attr( 'data-location', location ).attr( 'data-description', $( this ).text() );
- } )
- }
- set_menu_attributes( $( '#top-menu' ), 'main nav' )
- set_menu_attributes( $( '#menu-footer-menu' ), 'footer nav' )
- } );
- } )( jQuery );
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement