What is console.log?

It’s not a jQuery feature but a feature for debugging purposes. You can for instance log something to the console when something happens. For instance: $(‘#someButton’).click(function() { console.log(‘#someButton was clicked’); // do something }); You’d then see #someButton was clicked in Firebug’s “Console” tab (or another tool’s console — e.g. Chrome’s Web Inspector) when you … Read more

How to debug JavaScript / jQuery event bindings with Firebug or similar tools?

See How to find event listeners on a DOM node. In a nutshell, assuming at some point an event handler is attached to your element (eg): $(‘#foo’).click(function() { console.log(‘clicked!’) }); You inspect it like so: jQuery 1.3.x var clickEvents = $(‘#foo’).data(“events”).click; jQuery.each(clickEvents, function(key, value) { console.log(value) // prints “function() { console.log(‘clicked!’) }” }) jQuery 1.4.x … Read more

Differences between socket.io and websockets

Misconceptions There are few common misconceptions regarding WebSocket and Socket.IO: The first misconception is that using Socket.IO is significantly easier than using WebSocket which doesn’t seem to be the case. See examples below. The second misconception is that WebSocket is not widely supported in the browsers. See below for more info. The third misconception is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)