Commit 9bc2670f authored by Shakarim Sapa's avatar Shakarim Sapa

- Test

parent a1f083cb
......@@ -112,37 +112,43 @@ $(document).ready(function() {
else {
$('.spec_propotition').hide();
}
});
});
$('body').on('click', 'a.ls_likes_y', function(){
link = $(this);
courseId = link.data('course');
if (!link.hasClass("ls_likes_y_choice") ) {
jQuery.ajax({
type: 'POST',
url: "/school/likes-course/like-course",
dataType: "html",
data: {'courseId': courseId},
success: function(data){
jQuery('.ls_likes').html(data);
}
});
}
link = $(this);
courseId = link.data('course');
if (!link.hasClass("ls_likes_y_choice") ) {
jQuery.ajax({
type: 'POST',
url: "/school/likes-course/like-course",
dataType: "html",
data: {'courseId': courseId},
success: function(data){
jQuery('.ls_likes').html(data);
}
});
}
});
$('body').on('click', 'a.ls_likes_n', function(){
link = $(this);
courseId = link.data('course');
if (!link.hasClass("ls_likes_n_choice")) {
jQuery.ajax({
type: 'POST',
url: "/school/likes-course/unlike-course",
data: {'courseId': courseId},
dataType: "html",
success: function(data){
jQuery('.ls_likes').html(data);
}
});
}
link = $(this);
courseId = link.data('course');
if (!link.hasClass("ls_likes_n_choice")) {
jQuery.ajax({
type: 'POST',
url: "/school/likes-course/unlike-course",
data: {'courseId': courseId},
dataType: "html",
success: function(data){
jQuery('.ls_likes').html(data);
}
});
}
});
$('#registration_form').magnificPopup({
type: 'inline',
preloader: false
});
});
......
......@@ -95,12 +95,6 @@ WidgetAssetBundle::register($this);
<div class="white-popup-block mfp-hide">
<?= RegistrationWidget::widget(); ?>
<script type='text/javascript'>
$(document).ready(function() {
$('#registration_form').magnificPopup({
type: 'inline',
preloader: false
});
});
</script>
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment