What does this code mean? (jquery) -
i reading plugin , can understand part
$('<ul />', { 'class': settings.ulclass, html: albumitem.join('') }).appendto($this);
what html:
albumitem.join('')
.html
keyword or user defined? can't search because wordhtml
return generic resultis selection similar
$('p').appendto($this)
? if can search grammar of this?
thanks
.join() native method of array objects, joins elements of array string.
assuming albumitem
array, albumitem.join('')
join elements in array create string joining character empty string.
ex:
var albumitem = ['one', 'two', 'three']; albumitem.join('') // give 'onetwothree'
your code
$('<ul />', { 'class': settings.ulclass, html: albumitem.join('') }).appendto($this);
will create ul
element class returned settings.ulclass
, have contents of array albumitem
children , element appended element referenced $this
demo: fiddle
Comments
Post a Comment