dimanche 25 septembre 2016

How to add a background image by jQuery? (Ruby on Rails)

enter image description here

Why doesn't the above code work? I have also tried puting the image file in the images directory, or using different kinds of url path like url("1.png"), url(../images/1.jpg), or url(app/assets/javascripts/1.png), neither worked (and I tried background-imagetoo!).

By the way it works when I tried an image located on the Internet (the link in the comment block in the above image)

Aucun commentaire:

Enregistrer un commentaire