最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Call a lightbox on mouseover? - Stack Overflow

programmeradmin1浏览0评论

My doubt is actually pretty simple. I have an image of a V890 server and on mouseover of that image i want to call a lightbox,which shows the specs of that server. I cant get the code to work. Also never used 'onmouseover' function before so dunno how to write the code.

I have found a useful lightbox called 'lightwondow'.

<a href=".html"class="lightwindow page-options" title="Sample Title"><strong>Monster Fixed Page</strong> - This page is just plain to big for the browser window unless you maximize a 30 inch monitor.</a>                                                                     

I need to add a mouseover to this code.

Any help would be appreciated.

Thanks.

Anand.

My doubt is actually pretty simple. I have an image of a V890 server and on mouseover of that image i want to call a lightbox,which shows the specs of that server. I cant get the code to work. Also never used 'onmouseover' function before so dunno how to write the code.

I have found a useful lightbox called 'lightwondow'.

<a href="http://www.p51labs./lightwindow/blank-huge.html"class="lightwindow page-options" title="Sample Title"><strong>Monster Fixed Page</strong> - This page is just plain to big for the browser window unless you maximize a 30 inch monitor.</a>                                                                     

I need to add a mouseover to this code.

Any help would be appreciated.

Thanks.

Anand.

Share Improve this question edited Mar 9, 2011 at 17:14 Pointy 414k62 gold badges595 silver badges629 bronze badges asked Mar 9, 2011 at 17:11 anandanand 4935 gold badges13 silver badges24 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

i think the lightbox is usually load at the onclick event, you have to change that to be able to lauch it onmouseover.

Open the file lightbox.js an change the line:

anchor.onclick = function () {myLightbox.start(this); return false;}

with:

anchor.onmouseover= function () {myLightbox.start(this); return false;}

By the way i think you ahve to add the rel attribute to the anchor:

 rel="lightbox"

HTH!

发布评论

评论列表(0)

  1. 暂无评论