난이도 있음 채택완료
ajax 쪽지를 참고해서 알림을 적용햇는데 잘됩니다.
알림내용이 레이어로 표시됩니다.
그런데 벨아이콘 우측에 동그라미로 숫자도 ajax로 변동시켜야 하는데 어떻게 해야 하는지...
<? if ($alims) { ?>
<ul id="alim_cnt" class="notification-drop">
<li class="item">
<i class="fa fa-bell-o notification-bell" aria-hidden="true"></i> <span class="btn__badge pulse-button "><?php echo count($alims);?></span>
<ul>
표시된 부분을 아래에 넣는다고 될거도 아니고 휴,,,위의 <?php echo count($alims);?> 요거를 아래코드에 넣을때는 어떻게 해야 하는지요,,
html = "<ul id='alim_cnt_layer' class='notification-drop'>";
html += "<li class='item'>";
html += "<i class='fa fa-bell-o notification-bell' aria-hidden='true'></i> <span class='btn__badge pulse-button'><?php echo count($alims);?></span>";
html += "<ul>";
$('#report').append(html);
$('#alim_cnt_layer').fadeIn();
setTimeout(function(){ hide_alim(); }, 30000);
요렇게 하니 안나와서요,,ㅋ
답변 5개
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
var alims = <?php echo count($alims); ?>;
html = "<ul id='alim_cnt_layer' class='notification-drop'>";
html += "<li class='item'>";
html += "<i class='fa fa-bell-o notification-bell' aria-hidden='true'></i> <span class='btn__badge pulse-button'>"+alims+"</span>";
html += "<ul>";
$('#report').append(html);
$('#alim_cnt_layer').fadeIn();
setTimeout(function(){ hide_alim(); }, 30000);
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인