D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
tattooscyy
/
test
/
public
/
js
/
Filename :
piercing_appointment.js
back
Copy
$(function () { $('#calendar').hide(); $('#pir').hide(); $('#saloons').change(function(){ var src = $(this).find(':selected').attr('data-src'); var id = $(this).val(); if(id > 0){ $('#calendar').show(); $('#pir').show(); }else{ $('#calendar').hide(); $('#pir').hide(); } }); $('.day_active').click(ajaxtime); function ajaxtime() { date = $(this).attr('id'); $('.day_active').css('background-color', '#DDD'); var saloon_id = $('#saloons').val(); $(this).css('background-color', 'red'); sp = date.split('-') //console.log(sp[1]); real_date = sp[3] + '-' + sp[2] + '-' + sp[1]; $('#work_date').text(real_date); $('#hide_day').val(real_date); $.ajax({ url: '/ajax/pierce', type: 'post', data: 'date=' + real_date + '&saloon_id=' + saloon_id, success: function (data) { $('#colo').html(data); }, error: function (data) { $('#colo').html(data); } }); } });