I have a div with a list of images showing in a slideshow.
HTML
<div id="slideshow">
<img src="../../img/apple.jpg" >
<img src="../../img/banana.jpg" >
<img src="../../img/bear.jpg" >
<img src="../../img/raspberry.jpg" >
<img src="../../img/strawberry.jpg" >
</div>
I have a JQuery function to dynamically add images to the slideshow
Javascript
$( "#slideshow" ).append('<img src="../../img/' + new_fruit_image + '">');
Is there a way to add the image into the div according to the name ? For example: I want to add mango.jpg into the 4th image position after bear.jpg and before raspberry.jpg .