Mouse Hover Popup(部分视图)在MVC中使用Ajax [英] Mouse Hover Popup(with partial view) Using Ajax in MVC

查看:59
本文介绍了Mouse Hover Popup(部分视图)在MVC中使用Ajax的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您需要在使用ajax悬停动作链接时显示弹出视图。但我不能显示弹出窗口..我请你清除我的问题..谢谢..以下是我的代码..





查看:

< div class =hover>

< b style =margin-left:-8px; font-size:large;颜色:#2B9CE2 ;>

@ Ajax.ActionLink(@ item.bName,Businessdetails,NewSearch,新{id = item.bID},null

< / b>

< / div>

@ Html.Partial(details);

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");

<div id="popup" style="display:none; width: 100px; height:100px;">
    <b>yasgfshdfhsdhf</b>
    <b>yasgfshdfhsdhf</b>
    <b>yasgfshdfhsdhf</b>
</div>





< script type =text / javascript>

调试器;

$(文件).ready(function() {

$(。hover)。each(function(){

$(this).mouseover(function(){

$(#popup)。对话框({

autoOpen:true,

标题:'标题',

宽度:'100px' ,

身高:'100px',

莫代尔:真实

});



});

$(this).mouseout(function(){

$(#popup)。dialog({

autoOpen:false,

});



});

});

});

< / script>



部分查看:



< div id =显示>

< 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:noneid =businessid> @ item.bID< / p>

< / 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>

推荐答案

(document).ready(function(){
(document).ready(function () {


(。hover)。each(function (){
(".hover").each(function () {


(this).mouseover(function(){
(this).mouseover(function () {


这篇关于Mouse Hover Popup(部分视图)在MVC中使用Ajax的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆