I’ve seen very much tutorials, where in the demo I see something like this:
// my dummy example
$(function() {
$('a.change').bind('click',function(event){
$('body').css('background','#27272')
});
});
I do not understand what $(function() { is doing and why it is not working? What can i do to get it working properly without breaking other code?
$(function() {})is a shortcode for$(document).ready(handler)more info can be found hereYour posted code shouldn’t break anything. Maybe you can provide a jsfiddle where we can look into it.