This menu works very well, it opens the pages within the same window, but it does not let me open in a new window.
I have already tried it in several ways but nothing but I can not open a new window.
This is my code:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery.cmenu.js"></script>
<link type="text/css" rel="stylesheet" href="cmenu.css" />
<script>
$(document).ready(function(){
$('.menu').cmenu();
});
</script>
<table border=7 ALIGN=CENTER width="100%">
<tr>
<td>
<br>
<table>
<br>
<center>
<tr>
<td width="210">
<br><br>
</td>
<td>
<ul class="menu">
<li action="index.php" label="Inicio">
<img src="images/index.png" />
</li>
<li action="nuevo.php" label="Nuevo Registro">
<img src="images/nuevo.png" />
</li>
<li action="reportes.php" label="Reportes">
<img src="images/reportes.png" />
</li>
</ul>
</td>
<td width="210">
<br><br>
</td>
</tr>
</center>
<tr>
<td>
<br><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
Cmenu.css file
.menu{
list-style: none;
}
.selected{
background-color: #EFF8FF;
z-index:1;
position:absolute;
height:150px;
width: 128px;
border-radius:5px;
border: 1px solid #5DA9D1;
display:none;
text-align: center;
border:1px solid #5DA9D1;
}
.selected label{
font-weight: bold;
font-family: Arial;
font-size: 11px;
color:#4C43F9;
position:relative;
top:128px;
}
.menu li{
/* position:relative; */
float:left;
height:128px;
width:128px;
cursor: pointer;
border-radius:5px;
}
.menu li img{
position:absolute;
z-index:10;
}
.container{
background-color: white;
margin:0 auto;
width: 960px;
}
File jquery.cmenu.js
(function($){
$.fn.cmenu=function(){
return this.each(function(){
var cmenu=$(this);
var menuItems=cmenu.find('li');
menuItems.bind('mouseover',function(event){
var prevDiv=$(this).find('.selected');
if (prevDiv.size()==1){
prevDiv.show();
}
else{
var div= $('<div>');
var label= $('<label>');
div.addClass('selected');
label.html($(this).attr('label'));
div.append(label);
$(this).prepend(div);
$(this).find('.selected').show();
}
})
menuItems.bind('mouseout',function(event){
cmenu.find('.selected').hide();
})
cmenu.find('img').bind('click',function(event){
var action = $(this).parent().attr('action');
location.href=action;
});
});// end fn.cmenu
}
})(jQuery);
And finally the file jquery-1.4.2.min.js You can download it from link because it is very extensive.