Question

Quick question:

Can I enable website preview on all of the links in my web page?
i.e. when the user moves the mouse over any link in the page, I want to show a simple popup window which loads the page in link.

If it's important, I'm using Asp.net

Was it helpful?

Solution

You can use an iframe tag to display another page.

    <iframe src="http://www.example.com"></iframe>

Your HTML

 <a class="tiptext">A link
 <iframe class="description" src="http://www.example.com"></iframe>
 </a>

Your CSS

.tiptext {
    color:#069; 
    cursor:pointer;
}
.description {
    display:none;
    position:absolute;
    border:1px solid #000;
    width:400px;
    height:400px;
}

Your JS

$(".tiptext").mouseover(function() {
    $(this).children(".description").show();
}).mouseout(function() {
    $(this).children(".description").hide();
});

JSFiddle: http://jsfiddle.net/yboss/q29tP/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top