Actually I was able to get the anwser but I would like to share on this thread incase someone in the future struggles with this issue:
<!-- jQuery Show Hide Toggle ! -->
<script type="text/javascript" src="/js/public/jquery-latest.min.js"></script>
<script type="text/javascript">
// set no conflict mode for jquery
var $jQ = jQuery.noConflict();
function updateProductCategory()
{
if(jQuery("#FIELD NAME").val() == "FIELD VALUE")
{
jQuery("#FIELD SELECTION").parents("li:first").show();
jQuery("#FIELD SELECTION").parents("li:first").show();
jQuery("#FIELD SELECTION").parents("li:first").hide();
jQuery("#FIELD SELECTION").parents("li:first").hide();
}
else if(jQuery("#FIELD NAME").val() == "FIELD VALUE")
{
jQuery("#FIELD SELECTION").parents("li:first").hide();
jQuery("#FIELD SELECTION").parents("li:first").show();
jQuery("#FIELD SELECTION").parents("li:first").show();
jQuery("#FIELD SELECTION").parents("li:first").show();
}
else
{
jQuery("#FIELD NAME").parents("li:first").hide();
jQuery("#FIELD SELECTION").parents("li:first").hide();
jQuery("#FIELD SELECTION").parents("li:first").hide();
jQuery("#FIELD SELECTION").parents("li:first").hide();
jQuery("#FIELD SELECTION").parents("li:first").hide();
}
}
jQuery(document).ready
(
function()
{
updateProductCategory();
jQuery("#FIELD NAME").change
( function()
{
updateProductCategory();
}
);
}
);
</script>