$.post('/ajax/do_ajax/ajax_save_cache', {localStorage: localStorage}, function(data, textStatus, xhr) { localStorage.clear(); }); } }; </script> <?php if ($mode == "edit") { ?> <script> $(".img_ele").click(function(event) { if(!confirm("Sure delete ?")){ return false; } var this_e = $(this); $.post('/homepage/ajax_delete_img', {img: $(this).data("img"),id: $(this).data("id")}, function(data, textStatus, xhr) { if(data.status == "success"){ this_e.addClass("animated fadeOut").delay(30); } //console.log(data.status); //console.log(textStatus); }); }); </script> <?php } show_modal_media("add_img_homepage");
echo $key; ?> " href="javascript:void(0)" class="thumbnail open-modal"><img src="<?php echo $value ? $value : "/asset/data/no_image.png"; ?> "></a> </div> <?php } ?> <div class='col-sm-3 add-more'> <a data-id="" href="javascript:void(0)" class="thumbnail "><img src="/asset/data/no_image.png"></a> </div> </div> <?php show_modal_media("instant_img"); ?> <script> $(".add-more").click(function(event) { var cln = $(this).clone().removeClass('.add-more'); $(this).before(cln); $.post('/ajax/do_ajax/save_img_instant', {id: $(".open-modal").length+1,src:""}, function(data, textStatus, xhr) { location.reload(); }); }); $(".open-modal").open_media({ open_style:"fast", callbackfn:function(selector_this){ $(".current_img").removeClass('current_img'); selector_this.addClass('current_img');