Reputation: 31
I am using this code if jQuery. and its not working where it has to be I want to debug every line of code by using "console.log" I am new for this I have installed firebug for debugging Can any please tell me how would I use console.log on this code
<script type="text/javascript">
$(document).ready(function() {
$("select").flexselect({ hideDropdownOnEmptyInput: true });
$("select").flexselect();
$("input:text:enabled:first").focus();
$("form").submit(function() {
alert($(this).serialize());
return false;
;
});
});
</script>
Upvotes: 0
Views: 112
Reputation: 56539
When you press F12, you can see the developer tools either in firebug or native browser tools.
Here you can place a breakpoint
like in the image below
If it is an external js
file, look for the file in source
tab.
embedded js scripts can be found in element
tab.
Now you can easily debug your scripts.
Upvotes: 1