I looked through the Internet, but could not find the answer to this question, where did this error come from?
Im working on a really simple code where I just replace some text with another.
This is HTML
<div class="imgLittle" style="background-image:url(http://voyagesarabais.com/1874431.jpg4fre);"</div>
<div class="imgLittle" style="background-image:url(http://voyagesarabais.com/159431.jpg4fre);"</div>
This is jQuery
$(document).each('.imgLittle',function(){
newLink = $(this).css('background-image').replace(/^(.*?\.jpg).*/, "$1");
$(this).css('background-image',newLink)
})
But when I run it, it exits with this output:
Uncaught TypeError: callback.apply is not a function
You can look there: JsFiddle .
source
share