January 29, 201016 yr Hi everyone, at last straws here. Been working on a website recently and decided to add in some nice features to the shop. Simply cannot figure out why my mouse over feature is not working. Been going over it with fine comb for two days now, not a glitch, the html and css pass online validators so problem is not there. The thing is it is possible, and the I'm sure the syntax is spot on throughout. Any help would be great otherwise it's time for a different strategy. http://www.barnbox.co.uk/shop.html I understand there it has been constructed strangely, I did not build the site! Thanks in advance. Matt
January 29, 201016 yr I see what are you trying to do. You could use jQuery and make your life a lot easier. Here is your click function made with jQuery. The mouseover will be similar, use hover instead of click. For the hover function check out the jQuery API here http://api.jquery.com/hover/ $("div.links table tr td img").click(function() { var div_id = $(this).attr("name"); /* your image name tag must be 1,2,3, etc */ $("div[id^='info']").addClass('invisible_div'); /* invisible_div is a CSS class (visibibility = "hidden") */ $("#info"+div_id).removeClass('invisible_div'); });
January 30, 201016 yr Author Hi sorry yes, I should have mentioned what was meant to happen - was in a rush to get to work. Thanks for the jQuery suggestion I will try to apply it now. Matt
Create an account or sign in to comment