Js background image - solved


i want in this line
$(‘body’).css(‘background-image’, ‘url(’ + image() + ‘)’);
return true;

to add the value
background no-repeat

thank you

Ok, looks like you have all the pieces you need. What’s your plan?

I have a js which change background images to my site

The issue is that the images/ pattern are repeating
i need to include to the code that the images must not repeating or to be 100% 100% fixed
In order the background to be suitable for all devices

I’m a web developer. May I suggest this:

Don’t use javascript to change style of elements. Javascript should be used to change behavior of DOM and CSS for styling.

But if you must…

body {
    background-repeat: no-repeat;

thank you i apply the element in my css sheetnot in the js