Styles are not applying on <li> elements when loading more <li> in a <ul> element.
So, I am trying to load more <li> elements in a <ul> element on clicking a button. The markup is something like this.
- <ul data-role="listview">
- <li data-inline="true">
- <a href="#" rel="external">
- <span class="imgContainer">
- <img src="#" width="160"/>
- </span>
- <p>
- <span class="title"><strong>#</strong></span>
- <span class="from">#</span>, <span class="views"># views</span>
- </p>
- </a>
- </li>
- </ul>
- <span data-role="button">Load More</span>
I have applied some styles to each <li> element and the thumbnail image inside it in the "imgContainer" div & the img tag inside it. On initial page load the <ul> has 20 <li> elements in it and the styles apply fine.
When I click on the more button, more <li> elements are loaded but the CSS doesn't apply on the imgContainer div and img tag inside it.
The CSS is conditional CSS using CSS3 Media Query written in the parent page only instead of being inside a CSS files.
- @media screen and (device-width:320px)
- {
- //load CSS from here.
- }
Any help with this?
______________________________________________________
Saurav Srivastava
Designer at SlideShare
Twitter: gx_saurav
Blog:
http://gxsaurav.com