Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

jQuery - get image filename

0 votes
5 views
added Sep 4 in jQuery by LC Marshal Lieutenant (13,450 points)
var floorplanImg = $('.detail-content.floorplan img').attr('src'), 
    tarr = floorplanImg.split('/'), 
	file = tarr[tarr.length-1], 
	dataImg = file.split('.')[0];

console.log(dataImg);

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...