PhantomJS - Login with jquery is not working in windows

page.open('http://localhost:3000', function() {
page.evaluate(function() {
    $('#username').attr('value', 'username');
    $('#username').change();
    $('#password').attr('value', 'password');
    $('#password').change();
    $('.btn-login').click().submit();
});});

I'm using jquery to login. And using .change(); to trigger an event. This code works fine for linux but not working for windows. Am i doing it wrong or is there any other way to solve this issue in windows?