Switch to full style
JQuery Examples
Post a reply

Using firebug with JQuery

Thu Jan 10, 2013 12:17 pm

Logging into Firebug console from JQuery, note you must have Firebug installed at your browser.
javascript code
<html>
<head>
<title>Using firebug with JQuery</title>

<!--
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
Note you can download the JQuery package instead of using Google version. -->
<script src="jquery-1.8.3.js"></script>

<script>
$(document).ready(function(){
$("button#btn1").click(function(){

$.enableConsole = false;
$.fn.console = $.console = function(method){
if (window.console && console[method] && $.enableConsole)
console[method].apply(this, [].splice.call(arguments,1))
return this;
}
// See console
$.enableConsole = true;

// calling firebug functions, here we use console functions
$.console('debug', 'Am debuging my code with firebug', 'debugging');

// Use firebug console chain function easily:
var color = 'yellow';
$('#divEnd').css('color', color).console('log', 'Setting font color to ', color);

// And the access to the other functions time and timeEnd
$('#divEnd').console('time', '1000').animate('message').console('timeEnd', '3000');

});
});
</script>
</head>
<body>

<div id="divEnd" style="background:#0414F4;color:white;width='100';">Content Here.</div>
<button id="btn1">Start Using Firebug</button>
</body>
</html>




Post a reply
  Related Posts  to : Using firebug with JQuery
 slide down using JQuery     -  
 accordion using JQuery     -  
 How to start JQuery     -  
 JQuery Animations     -  
 resize image using JQuery     -  
 Change CSS Properties from JQuery     -  
 Show slider Bar using JQuery     -  
 Get Mouse Position using JQuery     -  
 get url, title and url sent parameters with JQuery     -  
 Show Spinner using JQuery     -