be-fe / iSlider

Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App
http://be-fe.github.io/iSlider/
MIT License
1.66k stars 448 forks source link

anyway to make it dom reinit? #151

Closed boynet closed 9 years ago

boynet commented 9 years ago

I want it to be crawable by google. like instead of giving array of elemnts:

var data = [{
    'height' : '100%',
    'width' : '100%',
    'content' : '<div><h1>Home</h1><h2>This is home page</h2><p>home is pretty awsome</p><div>'
},{
    'height' : '100%',
    'width' : '100%',
    'content' : '<div><h1>Page1</h1><h2>This is page1</h2><p>page1 is pretty awsome</p><div>'
},{
    'height' : '100%',
    'width' : '100%',
    'content' : '<div><h1>Page2</h1><h2>This is Page2</h2><p>Page2 is pretty awsome</p><div>'
}];

just preinsert the li elemnt like:

<div id="iSlider-wrapper">
 <div><h1>Page1</h1><h2>This is page1</h2><p>page1 is pretty awsome</p><div>
<div><h1>Page2</h1><h2>This is page2</h2><p>page2 is pretty awsome</p><div>
<div><h1>Page3</h1><h2>This is page3</h2><p>page3 is pretty awsome</p><div>
</div>
xieyu33333 commented 9 years ago

Because I must control the style, the wrapper is custom appointed, the content also custom appointed. How can I set style to these?

qbaty commented 9 years ago

iSlider will manager those elements, and keep elements as less as possible for efficiency. so those dom are generated dynamically. @boynet we will consider a better way to solve this, thank you