I have a select element and i wanna take some custom data from this. I don't know if this syntax is right but is possible to get the data??
<select data-select="placeholder:This is title; width:300px; dissabled; hidden;"></select>
If the attribute have inside colon [ : ] , the left part i wanna use it something like new attribute and the right part as the value of this
The semicolon [ ; ] is used to break this new attributes
The logic is like the style attribute
The code i wanna have this form:
$("[data-selectlist]").each(function(){
var $ul = $("<ul/>", {
'placeholder': $(this).attr('placeholder'),
'width' : $(this).attr('width')
});
.
.
.
});
With what i can replace the .attr() to have the desired result??
<ul>element hidden, disabled etc. An<ul>cannot be disabled and havewidthattribute :)