通过按钮点击事件代码后面的jquery打开Div [英] Open Div by jquery by button click event code behind
本文介绍了通过按钮点击事件代码后面的jquery打开Div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨。
我有问题在asp.net中用cs代码隐藏文件打开jqury div。
代码
< head>
< style type =text / css>
。 reminder_c
{
height : auto;
width : 1000px;
background-color : #e2e2e2;
padding : 17px 10px 10px 10px;
position : 已修复;
left : 50%;
top : 80px;
margin-left : -510px;
z-index : 90;
display : 无;
}
< / style>
< script src = js / myScript.js type = text / javascript > < / script >
< script type = text / javascript >
$(document).ready(function(){
setInterval(function(){$(。overlay)。fadeIn(200); $( reminder_c。)淡入(500)。 },5000);
$(。close)。click(function(){
$(this).parent(div)。fadeOut(200,function(){
$(。overlay)。fadeOut(200);
});
});
< body>
< asp:按钮ID = Button1 runat = server onclick = Button1_Click Text = 按钮 />
< div class = reminder_c >
< div class = close > < / div >
< asp:Label ID = Label1 runat = server Text = Label >
< / div >
< / b ody >
.cs代码:
protected void Button1_Click(object sender,EventArgs e)
{
}
我想打开编写代码以在cs代码中打开按钮点击事件。
请给我这个问题的解决方案。
解决方案
(document).ready(function(){
setInterval(function(){
( 叠加 )淡入(200);
( reminder_c。)淡入(500)。 },5000);
Hi.
I have problem to open jqury div by cs code behind file in asp.net.
The code
<head>
<style type="text/css">
.reminder_c
{
height: auto;
width:1000px;
background-color: #e2e2e2;
padding: 17px 10px 10px 10px;
position: fixed;
left:50%;
top: 80px;
margin-left: -510px;
z-index: 90;
display: none;
}
</style>
<script src="js/myScript.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
setInterval(function () { $(".overlay").fadeIn(200); $(".reminder_c").fadeIn(500); }, 5000);
$(".close").click(function () {
$(this).parent("div").fadeOut(200, function () {
$(".overlay").fadeOut(200);
});
});
<body>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
<div class="reminder_c">
<div class="close"></div>
<asp:Label ID="Label1" runat="server" Text="Label">
</div>
</body>
.cs code:
protected void Button1_Click(object sender, EventArgs e)
{
}
I want to open write code to open button click event in cs code.
Please given me the solution for this problem.
解决方案
(document).ready(function () { setInterval(function () {
(".overlay").fadeIn(200);
(".reminder_c").fadeIn(500); }, 5000);
这篇关于通过按钮点击事件代码后面的jquery打开Div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文