• Hi, this is one Slide Menu tutorial, i need to use it in my wordpress blog as sidebar.only i need right side menu.
    Header

    
    <script src="<?php echo get_template_directory_uri(); ?>/js/classie.js"></script>
    <script src="<?php echo get_template_directory_uri(); ?>/js/modernizr.custom.js"></script>
    

    Template page
    <div class=”cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right” id=”cbp-spmenu-s2″></div>
    <button id=”showRight”>Show/Hide</button>

    
    <script>
    var menuRight = document.getElementById( 'cbp-spmenu-s2' ),
    	 body = document.body;
    showRight.onclick = function() {
    	classie.toggle( this, 'active' );
    	classie.toggle( menuRight, 'cbp-spmenu-open' );
    	disableOther( 'showRight' );
    			};
    	if( button !== 'showRight' ) {
    	classie.toggle( showRight, 'disabled' );
    				}}
    </script>
    

    Everything showing, but no sliding animation. What codes i have to use to get the same slide menu animation ?. -Thank You-

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Hello again!

    I don’t know if this will solve your problem, but it’s good to know anyway. You should not add script source links directly to your WP header template. You should use wp_enqueue_script() from within the appropriate action link. Doing so will cause WP to insert the script source links for you. And since you specify which dependencies are required for your script when you enqueue it, these are also properly resolved for you by WP.

    What codes i have to use to get the same slide menu animation ?

    Hi shihabmalayil,
    your most prob already moved on from this but anyways…
    The animation is in the css file and run off the classes classie.js adds.

    /* Transitions */
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    transition: all 0.3s ease;

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘What Error in my Slide Menu’ is closed to new replies.