6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【bxSlider】jQueryでappendしたHTMLを動かす

Posted at

jQueryでappendしたHTMLをbxSliderで動かすときはそのままじゃ動かないみたいなのでメモ。

HTML(そのままでOK)

<ul class="bxSlider">
</ul>

js

/* bxsliderを呼び出すのを変数にする */
var slider = $('.bxSlider').bxSlider({
	//設定
});

/* append */
var slideDate = '<li><a href="http://qiita.com/"><img src="https://pbs.twimg.com/profile_images/842946405/profile_img_normal.png"></li>';
$('.bxSlider').append(slideDate);

/* appendしたあとにリロード */
slider.reloadSlider();

参考:Examples | Responsive jQuery Slider | bxSlider

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?