I am populating an array dynamically which is based on all the ids on the page's video tags.
How can I remove the word dog from each array item's value? Here is the populated array so far, I just need to remove the word dog for each array item:
var players = new Array();
$("video").each(function(){
players.push($(this).attr('id'));
});
So it would go from:
["video_12_dog", "video_13_dog"]
to:
["video_12", "video_13"]
$(this).attr('id')instead ofthis.id, I'd be ... slightly well off.