Support » Plugins and Hacks » Styling Output

Styling Output

Viewing 2 replies - 1 through 2 (of 2 total)
  • Whoops it turns my <ul> and <li> into code haha.

    Plugin Author Jose Luis SAYAGO


    Hi, well it could be done using jQuery selectors to add missing elements. However, I’ll keep your idea in mind for future releases.

    To be more specific about selectors, here’s an idea:

    1.- Create a custom script which you can call nlposts-jqmobile.js for example, save it to your theme root folder then add something like this:

    		"data-role": "listview",
    		"data-inset": "true",
    		"data-scheme": "a"

    2.- Load the script from your theme’s functions.php file, like this:

    function nlposts_jqmobile() {
                   get_template_directory_uri() . '/nlposts-jqmobile.js',
    add_action( 'wp_footer', 'nlposts_jqmobile' );

    That’s it, now lists should look like:

    <ul class="nlposts-wrapper nlposts-ulist nav nav-tabs nav-stacked" data-role="listview" data-inset="true" data-scheme="a">
         <li class="nlposts-ulist-litem nlposts-siteid-1">...</li>
         <li class="nlposts-ulist-litem nlposts-siteid-2">...</li>

    If you want to add attributes to LI elements you can repeat the same operation but selecting li classes instead of ul ones.

    Hope this help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Styling Output’ is closed to new replies.