Mouse Hover Popup(部分视图)在MVC中使用Ajax

编程入门 行业动态 更新时间:2024-10-25 06:23:17
本文介绍了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

本文发布于:2023-11-15 10:35:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1593662.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视图   Hover   Mouse   Popup   Ajax

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!