jquery - chrome extension popup.js is not working -
i have popup.html looks this
<!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="css/fbh-ui.css" /> <script type="text/javascript" src="js/jq.js"></script> <script type="text/javascript" src="js/fbh-popup.js"></script> </head> <body style="width: 200px"> <div id="fbh-main"> <div id="fbh-popup-enabled"></div> </div> </body>
and fbh-popup.js looks this
$('#fbh-popup-enabled').html('test');
the js should alter content of div not. tried simple console.log('test') in js file , didn't fire. @ loss.
you have write code within ready event callback
$(document).ready(function() { $('#fbh-popup-enabled').html('test'); });
jquery google-chrome google-chrome-extension
No comments:
Post a Comment