• Hi

    I am using cufon (a font replacement script) on my sites menu. I only want the cufon applied to the main links, not the dropdown child pages.

    The way I do this is to apply a specific class to the parent pages and another to subpages, and than only apply cufon to a.withparent class.

    I was able to get this to work using the following jquiry:

    <script type="text/javascript">
    		jQuery(document).ready(function() {
    			jQuery('.page_item a').addClass('scrollover').attr("id","scrollover");
    			jQuery('li.page_item ul li a').addClass('sub').attr("class","sub");
    
    		});
    	</script>

    Now this all works well.

    The issue is, I need to put a special snippet of code to make the cuson work in IE without delay, the code is this:

    <script type="text/javascript"> Cufon.now(); </script>

    Once I add this code, the cufon loads without delay, but it loads before the above the jquiry code assigning the class to the links, so in the end the header links do not get font replacement cause the font replace class is not yet applied.

    Here is my site – https://medicalwpthemes.com/drstyle/

    (notice the links now all work properly , As I removed IE cufon.code

    I know this is a mouthful, any help/ideas is greatly appreciated.

  • The topic ‘Applying seperate classes to sub and parent pages on wp_list_pages (cufon)’ is closed to new replies.