widgets: fix detached sync event: cache valid $body object when document is ready

This commit is contained in:
jean-emmanuel 2017-01-04 22:45:37 +01:00
parent 7ff5ae801f
commit 688cdde501

View file

@ -22,6 +22,11 @@ var hashCode = function(s){
return s.split("").reduce(function(a,b){a=((a<<5)-a)+b.charCodeAt(0);return a&a},0);
}
var $body
$(function() {
$body = $('body')
})
module.exports.tabs = function(data,parent,main,parentLabel){
if (main) {
@ -43,7 +48,6 @@ module.exports.tabs = function(data,parent,main,parentLabel){
widgetManager.reset()
var $body = $('body')
}
var main = main?'main ':'',