{"title":"Defining Layer ID","id":52031,"link":"https:\/\/env.averta.net\/en\/step\/defining-layer-id\/","parent":[51827],"content":"<p>Layer ID is a custom attribute of layer element which specifies a unique ID for the layer. This unique ID is used for finding the layer in the slider when you want to use <a href=\"https:\/\/env.averta.net\/en\/step\/api\/?b=51858,51858\" title=\"API\">slider API<\/a> or <a href=\"https:\/\/env.averta.net\/en\/step\/adding-layer-actions\/?b=51974,51974\" title=\"Adding Layer Actions\">layer actions<\/a>.<\/p>\n<p>The layer ID should be unique inside the slider scope. To specify it you need to add it by <code>data-id<\/code> attribute<\/p>\n<pre class=\"lang:xhtml decode:true \">\t&lt;div id=\"masterslider\" class=\"master-slider\"&gt;\r\n\t\t&lt;div class=\"ms-slide\"&gt;\r\n\t\t\t&lt;!-- .... --&gt;\r\n\t\t\t&lt;div class=\"ms-layer\"\r\n\t\t\t\t\t data-type=\"text\"\r\n\t\t\t\t\t data-id=\"foo\"&gt;\r\n\t\t\t\tText layer content here...\r\n\t\t\t&lt;\/div&gt;\r\n\t\t\t&lt;!-- .... --&gt;\r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;!-- .... --&gt;\r\n\t&lt;\/div&gt;<\/pre>\n","type":"solution"}