RayT
asked on
Inserting Images into Div Tag
Is there a way to use JQuery to insert images into a div tag?
Here’s what I would like the result to look kike:
<div id=’photos’>
<img alt='' src='Photos/Photo1.png' class='Photos_ImagePos'/>
<img alt='' src='Photos/Photo2.png' class='Photos_ImagePos'/>
<img alt='' src='Photos/Photo3.png' class='Photos_ImagePos'/>
</div>
When I try it the images don't appear???
$("#photos").append("<img alt='' src='Photos/Photos1.png' class='Photos_ImagePos'/>" );
Here’s what I would like the result to look kike:
<div id=’photos’>
<img alt='' src='Photos/Photo1.png' class='Photos_ImagePos'/>
<img alt='' src='Photos/Photo2.png' class='Photos_ImagePos'/>
<img alt='' src='Photos/Photo3.png' class='Photos_ImagePos'/>
</div>
When I try it the images don't appear???
$("#photos").append("<img alt='' src='Photos/Photos1.png' class='Photos_ImagePos'/>"
Actually there should be double quotes in all the areas.. in HTMl..
corrected code...
and then other reason could be you have not linked to jquery..
corrected code...
<div id="photos">
<img alt="" src="Photos/Photo1.png" class="Photos_ImagePos">
<img alt="" src="Photos/Photo2.png" class="Photos_ImagePos">
<img alt="" src="Photos/Photo3.png" class="Photos_ImagePos">
</div>
and then other reason could be you have not linked to jquery..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!!!
<div id='photos'>