Click here to Skip to main content
16,012,821 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
how to give image path in jquery with class and change image size


What I have tried:

actual_path_marker[j].setIcon("image/our-new-pin.PNG"); size=10 class ="img"
Posted
Updated 29-Aug-16 0:07am

JavaScript
$('.imagename').prop("src","your image url");
$('.imagename').css({ 'width': '300px', 'height': '200px' });
 
Share this answer
 
v3
try this

JavaScript
var imageUrl = 'your url of the image'
       $('.img').attr("src", imageUrl);
       $('.img').css({ 'height': '100px', 'width': '100px' });
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900