primarily, i\'m new for Jquery.
I have images like that . What i want is that when user click image,it makes image bordered. User can select a number of images. It
first add a class for selections and then add items to array which have 'selected-image' class while form posted
$(document).ready(function() {
var selectedImgsArr = new Array();
$("img").click(function() {
if($(this).hasClass("selected-image"))
$(this).removeClass("selected-image");
else
$(this).addClass("selected-image");
});
$("form").submit(function(){
selectedImgsArr.push($(".selected-image").attr("src"));
})
});