Consider code A and code B. They look identical but one is written by me. The other, copy pasted from W3. Code A (the one written by me) doesn't work but Code B does. Why is this? I've done a string match and it says it doesn't match but putting them ontop of each other in notepad (the code being one line already) reveals that its not different at all. Is there anything i'm doing wrong?
Code A:
$(document).ready(function(){
$(".sub").click(function(){
$(".sub").slideToggle("slow");
});
});
Code B:
$(document).ready(function(){
$(".sub").click(function(){
$(".sub").slideToggle("slow");
});
});