Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

set background image URL jQuery

jQuery('selector').css('background-image'); // gets the image URL
jQuery('selector').css('background-image', 'path/to/image.jpg'); // sets the image URL
Comment

PREVIOUS NEXT
Code Example
Javascript :: call json api javascript 
Javascript :: change href javascript 
Javascript :: javascript check if property exists in object 
Javascript :: remove last element from array javascript 
Javascript :: cookie in javascript 
Javascript :: remove letter until vowel javascript 
Javascript :: javascript clear child elements 
Javascript :: js show element with focus 
Javascript :: how to get a random statement from an array in javascript 
Javascript :: array.reverse 
Javascript :: react js pdf generate from html 
Javascript :: js jquery include external script 
Javascript :: string interpolation in javascript 
Javascript :: nodemailer send email 
Javascript :: process.env 
Javascript :: siwtch case javascript 
Javascript :: react router route not found redirect 
Javascript :: how to use put to request in nodejs 
Javascript :: angularjs dropdown 
Javascript :: Conditionallu inline styling in react 
Javascript :: p5.js 
Javascript :: rotate array by d elements javascript 
Javascript :: how to use filter in typescript 
Javascript :: send mail in node js without password 
Javascript :: vue custom events 
Javascript :: how avoid populate mongoose return password 
Javascript :: sort method in js 
Javascript :: react useid hook 
Javascript :: router in next js 
Javascript :: javascript foreach url parameter 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =