Click here to Skip to main content
15,885,069 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi need to display a popup view while hovering an action link using ajax. but i cant display popup.. i kindly request u clear my issue.. thanks.. following are my codes..


View:
<div class="hover">
<b style="margin-left: -8px; font-size: large;color: #2B9CE2;">
@Ajax.ActionLink(@item.bName, "Businessdetails", "NewSearch", new { id = item.bID }, null
</b>
</div>
@Html.Partial("details");
XML
<div id="popup" style="display:none; width: 100px; height:100px;">
    <b>yasgfshdfhsdhf</b>
    <b>yasgfshdfhsdhf</b>
    <b>yasgfshdfhsdhf</b>
</div>


<script type="text/javascript">
debugger;
$(document).ready(function () {
$(".hover").each(function () {
$(this).mouseover(function () {
$("#popup").dialog({
autoOpen: true,
title: 'Title',
width: '100px',
height: '100px',
modal: true
});

});
$(this).mouseout(function () {
$("#popup").dialog({
autoOpen: false,
});

});
});
});
</script>

Partial View:

<div id="Display">
<div id="map_container"></div><br />
<h2>@item.bName</h2>
<i>@item.City</i>
<b>@item.Address1@item.Address2</b>
<b>@item.MobileNumber</b>
<h4>@item.StartTime@item.EndTime</h4>
<p style="display:none" id="businessid">@item.bID</p>
</div>
Posted

1 solution

I have the feeling that you are not using the JQuery dialog correctly, by default it takes over the screen so the "mouseout" will not occur. See a basic example of what you are trying to do here:

http://jsfiddle.net/kellyapt1/0xrkp76w/1/[^]

If you want to close a dialog yourself, you need to call .dialog( "close" );
 
Share this answer
 
v2
Comments
Member 11367931 11-Aug-15 3:28am    
thanks sir.am new to MVC

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900