Saturday 15 May 2010

php - How do I add an onclick event to the Wordpress wp_list_pages function? -


My goal is to scroll the page to the right or to the left when you slide the contents smoothly on a Clicks on the page link. Screen

Here the HTML will appear to do this:

    

But I want the navigation menu to be dynamic ; Php wp_list_pages (array ('title_li' => gt; '', 'Depth' => 1, 'link_before' =>

    

How do I add the onclick function to anchor tag? I am new to php and need help in knowing how to do this. Thank you, I appreciate your time.

You can use custom walkers to add attributes to the menu item.

= FALSE, 'menu_class' => gt; '', 'menu_id' => wrong, 'depth' => 1, 'walker' => New description_width));

Enhance Walker_Nav_Menu and change the function start_el (& amp; $ output, $ item, $ depth, $ args) by the class details_work.

Reference

Or one more way



No comments:

Post a Comment