0

I'm using Drill Down Ipod Menu and I'm really like the style of showing submenus , but I have two problems with it.

1-when i load a page it shows all submenus open for a second and I experience a Flash of Unstyled Content , it was good for a while when I changed style css but it backed again (i don't know if there's a relation between css file and the problem). my list of active plugins is below (I had some others that i deleted them):

1-Bulk Post Creator Plus 2-Cat + Tag Filter 3-Category Grid View Gallery 4-cforms 5-Custom Field Template 6-ShowID for Post/Page/Category/Tag/Comment 7-SwfObj 8-vSlider 9-wp-jalali

how can I prevent showing my menu unstyled ?

2- when I navigate from a submenu to my homepage (from a link outside of menu) menu stay in previous state , i know it use cookies , but is there anyway to show current page instead of using cookies ?

if it's impossible to solve this problems what plugin can I use instead to have folding menus from wordpress custom menus (not pages and categories ) ?

sorry for my bad english thanks in advancce

2 Answers 2

0

Your best bet would be to consult the author of plugin since it's using a custom jQuery plugin script.

how can I prevent showing my menu un styled?

You can add a class of no-display to the elements of the menu that are un styled as the page loads then in css set .no-display {display:none;}Then use jQuery to remove the `no-display' class when the page is loaded right before it calls the plugin javascript.

jQuery(document).ready(function($) {
    $('#parent-div').removeClass("no-display");
})
1

thanks to chris for the idea , my problem has solved as following instruction :

1- For the un styled view : I tried use display:none; but there was problems happening in showing menu (no content showing after remove it or change "none" to "block" , so I've added below style to my sidebar in sidebar.php :

<div id="sidebar" style="position:absolute; left:-9999px; top:-9999px; ">

it will create my menu but showing in in a place that no one can see , next i've removed style in footer (when everything loaded) using jquer (right before and after <?php wp_footer(); ?>):

<script>
jQuery(function ($) {
$(document).ready(function() { $('div#sidebar').removeAttr('style'); });
$('div#sidebar').addClass("sideshow");


});
</script>

now there is no FOUC even in dial-up connection !

2- for the menu state problem : drop drill ipod menu using cookies to save last menu state , so i've added following code to header to delete cookies in certain pages (right after <div id=header>):

<?php if(is_page(array(22,35,13,27,67))){ ?>

<script>
jQuery(function ($) {
$.cookie('dd-wrapper-0','');
});
</script>

<?php } ?>
<?php if(is_front_page()){ ?>

<script>
jQuery(function ($) {
$.cookie('dd-wrapper-0','');
});
</script>

<?php } ?>

work like a Charm !

now menu restart to default state in homepage and selected page.

1
  • Great that you were able find a workable solution. Good job.
    – Chris_O
    Commented Aug 26, 2011 at 4:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.