{"title":"Adding a New Slide to the Slider","id":51891,"link":"https:\/\/env.averta.net\/en\/step\/adding-a-new-slide-to-the-slider\/","parent":[51826],"content":"<p>Slides are defined by?<code>ms-slide<\/code>?class name in the slider markup. To add a new slide to the slider, you need to add a new element as a first level child of slider element. Slider shows the slides in the same order of added slides in the markup, unless,?<code>shuffle<\/code>?option was set in the options.<\/p>\n<p>There is no limit in the type of the slide element, you can use?<code>div<\/code>,?<code>section<\/code>,?<code>article<\/code>, or any other semantic HTML5 elements.<\/p>\n<p>You may need to add some parameters to the slide, slide parameters will be specified by data attributes over the slide element. For more information check out <a href=\"https:\/\/env.averta.net\/en\/step\/introducing-slide-parameters\/?b=51893,51893\" title=\"Introducing Slide Parameters\">Slide Parameters<\/a> article.<\/p>\n<p class=\"aswi-text-box box-info\"><strong>Note: <\/strong>Master Slider does not support to add new slides after the initiation. This article only describes how to add new slide before slider initialization.<\/p>\n<p>The following example creates a slider with three slides:<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;div id=\"masterslider\" class=\"master-slider\"&gt;\r\n\t\t&lt;div class=\"ms-slide\"&gt;\r\n\t\t\t&lt;!-- slide content here --&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div class=\"ms-slide\"&gt;\r\n\t\t\t&lt;!-- slide content here --&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div class=\"ms-slide\"&gt;\r\n\t\t\t&lt;!-- slide content here --&gt;\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;<\/pre>\n","type":"solution"}