jquery ui - JQueryUI in Chrome extension content script -


after putting jquery-ui(css , js) , jquery in manifest, can use jq selectors ($), jquery-ui seems inaccessible. example, i'm trying insert resizable div in content-script (content_script.js):

var $div = document.createelement('div'); $div.id = 'divid'; $div.innerhtml = 'inner html'; $("body").append($div);//works without error $("#divid").css("background-color","yellow");//works //doesn't give resizable handles, works in regular html file: $("#divid").resizable(); //however has issue: document.getelementbyid("divid").style.resize = "both"; 

manifest:

"css":["jquery-ui.css"], "js": ["jquery-ui.js","jquery.js","content_script.js"] 

wrong load order - jquery-ui expects jquery loaded first.

"js": ["jquery.js", "jquery-ui.js", "content_script.js"] 

Comments