开发者

how to enlarge image onmouseover in gridview

开发者 https://www.devze.com 2023-01-11 09:46 出处:网络
I need help again. Displaying ima开发者_如何学Goges on gridview is never been a problem to me but how can i enlarge my image onmouseover event in gridview? Use javascript or jquery to perform the task

I need help again. Displaying ima开发者_如何学Goges on gridview is never been a problem to me but how can i enlarge my image onmouseover event in gridview?


Use javascript or jquery to perform the task.


erm...

If you will enlarge those images to a default heightXwidth i will consider using css and adding that class in the mouseover event... and removing it in the mouseout...

if you use JQuery you can add that css class like:

$('#elementID').addClass('enlarged'); <-- enlarged class resizes my image

and to remove the added class just:

$('#elementID').removeClass('enlarged');

if you dont use any javascript library, you can add a class using:

document.getElementById("elementID").className += " enlarged";

to remove it:

document.getElementById("elementID").className = document.getElementById("elementID").className.replace(/\benlarged\b/','')
0

精彩评论

暂无评论...
验证码 换一张
取 消