1

I have an example div with slides:

<div u="slides" ...>
    <div id="slide1">**original content 1**</div>
    <div id="slide2"><!-- any content of slide2 --></div>
</div>

I've found one answer here jssor slider: How to reload/refresh the slider to show new images that says:

'You can place any content in each slide and you can remove/insert elements freely at runtime.'

So I have tried it, I changed content of one particular slide:

$('#slide1')[0].innerHTML = 'new sample content of the slide';

after executing the assignment as above my slide still SHOWS 'original content 1' however when doing alert($('#slide1')[0].innerHTML) I am getting what I want [i.e.: 'new sample content of the slide'].

How do I make jssor slider to reflect changes applied to the slide?

Community
  • 1
  • 1
trs
  • 11
  • 2
  • If you're using jQuery, really use it : `$('#slide1').html('new...')`. Can you post a demo of your script not working? A [JS Fiddle](http://jsfiddle.net) would be awesome. That way we can play with it and see what's wrong. – blex Feb 20 '15 at 23:08
  • Thanks @blex, it's working now. $('#slide1').html('new...') instead of $('#slide1')[0].innerHTML='new...' did the thing – trs Feb 20 '15 at 23:32
  • when observing html with firebug I've found out that I have two div's with slides with the same ids (both for the outer divs 'slidesContainer' and slides within). The only difference is that the second one has attribute debug-id="slide-board" so this is some debug mode I run and therefore it might be also the reason why my first try failed (it was changing the wrong div, lets say the first one whereas it was the second which was visible). But to verify I would need to turn off this debug mode somehow and currently I don't know how to do that and I am ignoring that. Thanks @blex anyway.[tolong] – trs Feb 21 '15 at 00:27
  • You are using a version a bit older. There is no duplicate slide element in the latest version. – jssor Feb 21 '15 at 08:32

0 Answers0