I have a code snippet that is currently functioning properly
$(window).load(function(){
$(document).ready(function(){
$("input[name ='_sft_product_cat[]']").parent().next(".children").css("background", "yellow");
})
});
My goal is to convert this into a click event, but I am facing difficulties in making it work. I have attempted the following
$(window).load(function(){
$(document).ready(function(){
$("input[name = '_sft_product_cat[]']").click(function(){
$(this).parent().next(".children").css("background", "blue");
return false;
});
}
Can anyone spot what I may be doing incorrectly?
Thank you