$(document).ready(function(cycle) { // run the code in the markup! $('#image pre code').each(function() { eval($(this).text()); }); }); $(document).ready(function() { $('#fade').cycle(); });