Question: ```
$('button').click(function(){ console.log('works'); });

```

This outputs 'works' when I click the required button. 

But if I pack the same code in a function and call it with parentheses attached to it(as you usually invoke a function), as in 

```
function worker(){ console.log('works'); }
$('button').click(worker());

```

*worker* gets fired without any click on *button*. But if I avoid the parentheses, as in 

```
function worker(){ console.log('works'); }
$('button').click(worker);

```

I'm getting the desired functionality. Why the *click* handler behaves this way?

Answer: 
I faced the same issue. I did the following steps, which solved the problem. Before flashing a new firmware, make sure your chip is fully erased. You may use the command below where "serial-port-of-ESP8266" may vary:

```
esptool.py --port <serial-port-of-ESP8266> erase_flash

```

Then flash the firmware to the chip using the same technique you use for flashing nodeMCU 0.9.6. You can refer the command below, which is what I used for flashing.

```
esptool.py --port /dev/ttyACM0 write_flash -fm qio 0x00000 nodemcu-master-8-modules-2016-12-16-09-52-59-float.bin

```
same problem and resolved with Marcel solution, but please take care about flash options: -fm dio -fs 32m

i was trying without, so only appending the esp\_init\_data\_default.bin, but it doesn't work.

you can check it because esptool shows, just before stating flash, an hexadecimal value
Flash params set to 0x0000 (wrong)
Flash params set to 0x0240 (fine!)