javascript - Code works in console/scratchpad but not in a Greasemonkey script? -


i'm trying write script make map larger on google flights.

i've got jquery working in firefox scratchpad. script trying accomplish:

$('div').filter(function(){     return $(this).css('width') == '648px' }).css({"width":"900px","height":"550px"}); 

but when paste greasemonkey script, doesn't work. if add console.logs debug, can verify script running , filter working correctly, it's not modifying css. ideas?

sometime need make sure script executed after page loaded

$(function(){    // code here }); 

you can try settimeout , put 2sec (2000)

var myfunc = function(){   // code here }; settimeout(myfunc, 2000); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -