Trying to set up adding slides to flexslider 2 in shopify.
Opened a thread, where a few syntax mistakes were pointed out. Fixed them but didn't get any replies since then, and I really need to get it going. So, here is 2nd try.
Basically, the idea is if variable equals another variable that is picked up from shopify settings, then script appends li with a slide. If not- nothing happens.
I'm as noob as they come in JQ. Can some one point out my mistake, please?
Thanks!
$(document).ready(function(){
var show = "block" ;
var showsetting1 = "{{ settings.mainslide_display1 }}" ;
if (showsetting1 === show)
{
$(".flexslider ul").append('<li class="slider-image1 slideswidth"><img src="{{ 'slider-image-1.jpg' | asset_url }}">');
}
else {}
});