3 <meta http
-equiv
="X-UA-Compatible" content
="IE=edge">
4 <meta name
="viewport" content
="width=device-width, initial-scale=1">
5 <title
>Artist Page
</title
>
6 <link rel
="stylesheet" href
="css/bootstrap.css">
7 <link rel
="stylesheet" href
="css/astyle.css">
8 <script src
="js/jquery-1.9.1.js"></script
>
9 <script src
="js/bootstrap.js"></script
>
13 $
(document
).ready(function(){
14 $
("[name=modalClose]").click(function(){
19 $
(document
).on('submit', '#categoryForm', function(){
20 //hide the notification messages
21 $
('#success, #error').fadeOut();
23 //show the loading image
25 var val
= $
('input[name=category]').val();
26 var str
= $
('#categoryForm').serialize();
27 $
('.formloader').css({'background':'#F9F9F9 url("http://russoil.eu/images/load.gif") no-repeat center', 'opacity':.5, width
:$
(this
).parent().width(), height
:$
(".modal-content").height(), position
:'absolute', top
:0});
31 $
.ajax({type
:'POST', url
: 'ajax/ajax.php', data
: str
,
33 success
:function(response
) {
34 if(response
.a
=='success'){
36 if(!$
("#categoryPanelDiv").is(":visible"))
38 $
("#categoryPanelDiv").removeClass("hidden");
40 $
("#categoryForm").prepend('<div class="alert alert-success" id="alert">The '+val+
' is successfully added</div>');
41 $
('input[type=text]').val('');
42 $
("#categoryList").append('<a class="list-group-item" href="?art&cat='+val+
'">'+val+
'</a>')
43 $
("select[name=class]").append('<option value="'+response
.b+
'">'+val+
'</option>')
45 $
("#categoryForm").prepend('<div class="alert alert-warning" id="alert">An error occured. Please contact the admin.</div>');
46 $
('.formloader').remove();
49 //remove the loading image
50 $
('.formloader').remove();