I want to write echo php variable in jquery without single or double quote. Below is my code
jQuery.noConflict();
jQuery(document).ready(function(){
jQuery('.your').slick({
autoplay: <?php echo $autoPlay; ?>,
autoplaySpeed: 2000,
dots: true,
infinite: true,
speed: 300,
slidesToShow: 4,
slidesToScroll: 1,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
dots: true
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
},{
breakpoint: 320,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
});
I want to echo $autoplay without double quote. When i write without double quote, its gave me error
Uncaught SyntaxError: Unexpected token ,
Any one help me to find out the exact solution for this
$autoplaylook like? Is it a string liketrueorfalse?