What is Join() in jquery? for example:
var newText = $("p").text().split(" ").join("</span> <span>");
What is Join() in jquery? for example:
var newText = $("p").text().split(" ").join("</span> <span>");
A practical example using a jQuery example might be
var today = new Date();
$('#'+[today.getMonth()+1, today.getDate(), today.getFullYear()].join("_")).whatever();
I do that in a calendar tool that I am using, this way on the page load, I can do certain things with today's date.