$( "input:checkbox" ).on("change", function() {
$('.reg').slideToggle();
});
<button class="btn btn-default" id="userSettings" style="font-size: 20px;"><i class="fa fa-gear"></i>Test</button>
<div class="settings" style="display: none;">
<h1>panel settings</h1>
</div>
<script type="text/javascript">
$(document).ready(function(){
$('#userSettings').click(function(){
$('#userSettings + .settings').slideToggle();
})
});
</script>
<a href="picture.jpg">
<img src="picture.jpg" />
</a>
<script>
$( function()
{
$( 'a' ).imageLightbox();
});
</script>
if (localStorage.getItem('display') == 'list') {
$('#content .row > .grid-product').attr('class', 'col-md-12 product_main list-product');
$('#list-view').trigger('click');
$('#list-view').addClass('active');
} else {
$('#grid-view').trigger('click');
$('#grid-view').addClass('active');
$('#content .list-product').attr('class', 'col-md-4 col-sm-6 product_main grid-product');
}
<script type="text/javascript">
$(".back").click(function() {
alert("fgadfbdsv");
});
</script>
<button class="back">back</button>