don't work 'fadeOut' If there is 'replaceWit
don't work 'fadeOut' If there is 'replaceWith'.?
当我使用fadeOut
和replaceWith
一起,不工作淡出。但如果我只使用fadeOut
它工作。我想把它们一起使用。它在我的代码中是怎样的?
$.ajax({
type: "POST",
url: url,
data: dataString,
cache: false,
success: function(html){
var $html = $(html);
////////////////////////////////// here ////////////////////////////////
$('.ser_form #paginate input:checkbox:checked').parent().parent().fadeOut("slow");
$('#num_count').replaceWith($html.find('#num_count'));
$('tr#paginate').replaceWith($html.find('tr#paginate'));
$('.pagination').replaceWith($html.find('.pagination'));
////////////////////////////////// here ////////////////////////////////
},
示例:参见
在上面的例子中,请选中row并点击DELETE查看它
这里我试着模拟你的场景http://jsfiddle.net/yY2AS/1/
你的问题我不是很清楚,总之……
在发出ajax请求之前执行
$this = $('.ser_form #paginate input:checkbox:checked').parent().parent();
然后使ajax调用(我猜ajax调用是删除和更新记录)
在成功回调do
success: function(html){
$this.fadeOut("slow");
//rest of the code
相关文章:
- Is onfling available for html, html5
- jQuery is not loaded
- reactRedux is not defined
- ReferenceError: cordova is not defined @ng-cordova.min.js:7
- Jquery - table.row(tr) is undefined
- contentWindow.document.body is null
- Tomcat websocket is not working
- noty.js is returning undefined
- Is there a wrapper/grouping element usable in <head>?
- Scala + Play + Akka. Is there a need for Backbone.js?
- Is there a interpretation difference between "..."
- There is no phonegap.js
- Is there any security risk using <noscript>?
- is there a .innerXML?
- Is there any difference between (cond && value || de
- Is there an npm for oauth?
- Is there a Money class for JavaScript?
- Is there any last() in YUI NodeList?
- don't work 'fadeOut' If there is 'replaceWit
- is there an iTunes javascript api