Title Attribute Array
Hi I'm getting the title attribute 'Knit, Main'. At the moment the var thinks that it is one word is there some symbol like ',' that will make the var handle them in an array? titl
Solution 1:
Try this:
var titles = this.title.split(/,\s?/)
Solution 2:
Use the JavaScript split
function
Solution 3:
Try using this
var titleIs = this.title; //if use this.title like string not array [this.title]
alert(titleIs.split(/,\s?/));
Post a Comment for "Title Attribute Array"