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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -