I have written a JQuery Plugin. The plugin adds a customised view to a list (similar to JQuery Mobiles .listview()).
The idea being I can create a generic unordered list and then apply my plugin to add behaviours and styles after.
<ul data-role="none">
<li>Hello</li>
<li>Hello</li>
</ul>
$("ul").myView();
What I haven’t seen much of is plugins adding big chunks of css. My plugin requires certain css classes to be available to work so where do I store them? is it common for plugins to come with stylesheets?
It is common for plugins to come with set of predefined CSS. But IMO it should be up to the plugin-user to manually add the stylesheet into the
<head>tag on their own before loading any javascript.