I am using the code below to send an ID to my page:
The image names will always look like this 12.jpg 12-1.jpg 12-2.jpg 12-3.jpg e.t.c
I need to alter the line below so it will only send the 12 not the -1,-2,-3 e.t.c My code below already removes the .jpg part
var id = $(this).attr('src').split('/').pop().replace('.jpg','');