大佬教程收集整理的这篇文章主要介绍了jquery – 在弹出窗口中选择2:搜索输入无法聚焦,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
# html <a href="#test-popup" class="open-popup-link">Show inline popup</a> <div id="test-popup" class="white-popup mfp-hide"> <SELEct id="focus-blur-loop-SELEct"> <option>Hello</option> <option>world</option> </SELEct> </div> # js $(function() { $('.open-popup-link').magnificPopup({ type:'inline',midClick: true }); $('#focus-blur-loop-SELEct').SELEct2({ width: '200px' }); }); # css .white-popup { position: relative; BACkground: #FFF; padding: 20px; width: auto; max-width: 500px; margin: 20px auto; }
我已经完成了一些基础研究,并且我发现下面的两个回调被称为unfinetly.事件中似乎存在一些无限循环.@H_489_10@
// SELEct2.js:742 search.on("focus",function () { search.addClass("SELEct2-focused"); }); search.on("blur",function () { search.removeClass("SELEct2-focused");});
$.magnificPopup.instance._onFocusIn = function(E) { // Do nothing if target element is SELEct2 input if( $(e.target).hasClass('SELEct2-input') ) { return true; } // Else call parent method $.magnificPopup.proto._onFocusIn.call(this,E); }
以上是大佬教程为你收集整理的jquery – 在弹出窗口中选择2:搜索输入无法聚焦全部内容,希望文章能够帮你解决jquery – 在弹出窗口中选择2:搜索输入无法聚焦所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。