happy new year

Your Good Name Here: (Maximum characters: 19)

var OrgFile=”http://ift.tt/2hr8hia”;
var file=’original’;
var id=0,fileid=721;
$(document).ready(function(){

function loader(){
$(“#mainart”).attr(‘src’,siteurl+’/images/loader.gif’);
}

$(“.art_var”).click(function(){
loader();
id=$(this).attr(‘id’);
var image=$(this).attr(‘name’);
file=’variation’;
$(“#mainart”).attr(‘src’,image);
$(‘#OtherOption’).hide();
});
$(“#loadoriginal”).click(function(){
loader();
id=0;
file=’original’;
$(“#mainart”).attr(‘src’,OrgFile);
});
//$(“#GenerateArt”).click(function(){
$(‘#createcard’).on(‘submit’, function() {
jsonObj = [];
var txtlen=$(“.names”).length,filltxt=0;
$(“.names”).each(function(i){
if($(this).val()!=””)
{
item = $.trim($(this).val());
if(item!=”){
jsonObj.push($(this).val());
filltxt++;
}
}
});

if(filltxt==0)
{
$(“#waitloader”).html(‘Please enter at least one name.’);
//alert(“Please enter at least one name.”);
return false;
}
else
{
$(‘#GenerateArt’).attr(‘disabled’,’disabled’);
$(“#waitloader”).html(‘Wait :
‘);
//alert($(‘#createcard’).attr(‘action’););
//$(‘#createcard’).submit();

/*$.ajax({type: ‘POST’, url: siteurl+’/generatepic.php’, data: {‘names’: jsonObj,’file’:file,’id’:id,’fileid’:fileid},
success: function(obj){
var json = JSON.parse(obj);
//alert(json.msg);
if(json.msg==’done’){
$(“#mainart”).attr(‘src’,json.file);
$( “#mainart” ).load(function() {

$(“#waitloader”).html(”);
$(“.share-your-image a”).attr(‘st_url’,json.shareurl);
$(‘#OtherOption’).show(“slow”);
});
}
else if(json.msg==’fail’){
$(“#waitloader”).html(‘Please try after some time.
‘);
}
$(‘#GenerateArt’).removeAttr(‘disabled’);
}

});*/
}
});

});

via Blogger http://ift.tt/2hqW5Or

Advertisements