hello !
I am making a website where i want that if i put mouse on category subcategory are open so i made changes in main code as provided previously
<?php while ( osc_has_categories() ) { ?>
<div class="category">
<img class="expand" src="<?php echo osc_current_web_theme_url ; ?>" class="expand" />
<h1><strong><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</span></strong></h1>
<?php if ( osc_count_subcategories() > 0 ) { ?>
<ul>
<?php while ( osc_has_subcategories() ) { ?>
<li><a class="category <?php echo osc_category_slug() ; ?>" href="<?php echo osc_search_category_url() ; ?>"><?php echo osc_category_name() ; ?></a> <span>(<?php echo osc_category_total_items() ; ?>)</span></li>
<?php } ?>
</ul>
<?php } ?>
</div>
<?php
And after <meta.... add this:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$.each($('.category ul'), function(index, value) {
$(this).hide();
});
$('.category h1').live('click', function() {
$(this).parent().find('ul').toggle('slow');
});
})
</script>
I wanted by hover so i made change in meta as
$('.category h1').live('hover', function() {
$(this).parent().find('ul').toggle('slow');
});
but now there is a problem when i remove my mouse from category to sub categories then the sub categories are also disappear .
my website is
www.tugalpur.complease help me !
thanks in anticipation
