没有页面加载,切换不起作用 [英] toggle is not working without pageload

查看:74
本文介绍了没有页面加载,切换不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用更新面板切换div和一些文本框,2下拉(用于选择状态和城市)..首先它工作正常但是当选择状态和城市切换无法工作时...它需要页面加载才能正常工作。 ..但我不想要页面加载

i have toggle div and some textbox,2 dropdown(for select state and city) with update panel ..at first it's work fine but when select state and city toggle fails to work...it's required pageload for work properly...but i dont want the pageload

推荐答案

原因是一旦你使用UpdatePanel它就会刷新DOM中的文本框和下拉列表,删除你关联的所有事件它。一种可能性是使用.live()方法订阅具有此文本框或下拉列表的事件
The reason is once you use the UpdatePanel it refreshes the textbox and dropdown from the DOM which removes all events you have associated with it. One possibility is to use the .live() method to subscribe for events with this textbox or dropdown


('。div2')。live('blur',function( pad){
('.div2').live('blur', function (pad) {


('。notepad')。animate({top:95%},1000);
('.notepad').animate({ top: "95%" }, 1000);


这篇关于没有页面加载,切换不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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