Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Listview does not allow per-listitem data-icon for split lists #3747
The data-icon attribute is ignored for split lists.
Note that non-split list items allow data-icons to be set per-listitem.
Here is an example:
And the obligatory jsfiddle:
added a commit
Mar 6, 2012
First, I only wish the fiddle was obligatory, thank you for including it :D
This is a feature request so it'll have to wait until after 1.1 is released unless @toddparker thinks it's worth getting into the next rc for 1.1 - in either case you can see the in the branch posted above. If you really need it you can pull that branch, do a build locally, and then rebase the branch onto the latest rc as needed until it's released.
You're welcome :-)
Thanks for the fix.
Guess I should have mentioned...the functionality I am after worked in the latest stable release and was broken by the current RC. Not sure if I am the only one affected. As a temporary workaround, I am not using split lists. I'd rather use split lists to minimize the actionable surface area of each list item. I've forked the original fiddle and fuddled with links and scripts.
Forked Fiddle with JQM 1.0.1:
This is sort of an accidental feature I guess in that we support icons for buttons but for non split list items the expectation is that the icon is defined on the list item. The branch that I pushed expects that the icon to be defined on the list item and not the link. Your feedback is welcome on that implementation.
Also, I'd like to double check that you built your markup as a consequence of the button docs and not the list docs. Which makes sense, but we should clarify or support both options in the future.
I've got a branch up for review of the change and a sample in the test.