Jquery changing background-image with Bold tag - Javascript jQuery

Javascript examples for jQuery:Image

Description

Jquery changing background-image with Bold tag

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.5.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//from  w  w  w.  j  av  a 2 s. co  m
$('#test').css('background-image', 'url(http://www.java2s.com/style/demo/Safari.png)');
    });

      </script> 
 </head> 
 <body> 
  <b id="test" style="width:400px; height: 100px;display: inline-block;"></b>  
 </body>
</html>

Related Tutorials