';
var position = content.indexOf('**/
var text_content=$('','').replaceAll(' ','').replaceAll(' ','');
text=head_text+tail_text;
}else{
text=text.replaceAll(' ','').replaceAll(' ','').replaceAll(' ','');
};
segment='';
};
if(winpic.length!=0){
var b = '
'+template+'
';
var position = content.indexOf('');
var br_pos=text.indexOf(' ');
if(br_pos==end_pos+2){
var pre_text=text.slice(0,end_pos+2);
var after_text=text.slice(br_pos+9);
text = pre_text + '' + after_text;
//return text;
return br_remove(text);
}else{
return text;
};
}
function remove_comment(text){
var start_pos = text.indexOf('');
if(start_pos!=-1&&end_pos!=-1){
return ''+text.slice(0, start_pos)+text.slice(end_pos+3);
}else{
return text;
};
};/**/
function open_imgs(event){
var image=$(event).find('img').attr('src');
var caption=$(event).attr('caption');
var value=$(event).val();
var post_order=Number(value.split(',')[0]);
var imgs_order=Number(value.split(',')[1]);
var imgs_total=Number(value.split(',')[2]);
//alert(image);
document.getElementById('modal-content').innerHTML='
'+(imgs_order!=0?'':'')+''+(imgs_order+1':'')+'
'+caption+'
';
close_modal();
}
function imgs_slide(event){
var value=$(event).val();
var post_order=Number(value.split(',')[0]);
var imgs_order=Number(value.split(',')[1]);
$('#imgs'+post_order+'_'+imgs_order).trigger('click');
}
function close_modal(){
var modal = document.getElementById('myModal');
// Get the element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks the button, open the modal
//btn.onclick = function() {
modal.style.display = "flex";
//}
// When the user clicks on (x), close the modal
span.onclick = function() {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
};
01212016 新聞追追追 (2) - 艾悠痞