Phil Jackson
12-07-2009, 10:34 PM
Hi all i have the following code.
$(document).ready(function(){
$("ul, li, a, p, img").hover(
function(){
var origBorder = $(this).css("border");
var elementID = $(this).attr("id");
$(this).css("possition", "absolute").css("z-index", "100").css("border", "1px solid red");
},
function(){
$(this).css("border", "none").css("z-index", "1");
}
);
});
it is suposed to outline the element that i am hovering over. Yet if I hover over say an <li> it will outline the li and the ul. Any ideas on how to just outline the element im hovering over?
$(document).ready(function(){
$("ul, li, a, p, img").hover(
function(){
var origBorder = $(this).css("border");
var elementID = $(this).attr("id");
$(this).css("possition", "absolute").css("z-index", "100").css("border", "1px solid red");
},
function(){
$(this).css("border", "none").css("z-index", "1");
}
);
});
it is suposed to outline the element that i am hovering over. Yet if I hover over say an <li> it will outline the li and the ul. Any ideas on how to just outline the element im hovering over?