芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/lugarcollectibles.com/admin/view/javascript/openbay/js/faq.js
$.extend({ getUrlVars: function(){ var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); for(var i = 0; i < hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; }, getUrlVar: function(name){ return $.getUrlVars()[name]; } }); function faq(){ var route = $.getUrlVar('route'); var user_token = $.getUrlVar('user_token'); $.ajax({ url: 'index.php?route=marketplace/openbay/faq&user_token=' + user_token + '&qry_route=' + route, type: 'GET', dataType: 'json', success: function(data) { if(data.faq_id){ var html = ''; html += '
'; html += '
'; html += '
'; html += '
'; html += '
'; html += '
'; html += '
' + data.title + '
'; html += '
' + data.message + '
'; html += '
'; html += '
'; $('.page-header:first').after(html); setTimeout(function() { $('#faq').slideDown('slow'); }, 2000); } } }); } function faqclose() { var route = $.getUrlVar('route'); var user_token = $.getUrlVar('user_token'); $('#faq').slideUp(); $.ajax({ url: 'index.php?route=marketplace/openbay/faqdismiss&user_token=' + user_token + '&qry_route=' + route, type: 'GET', dataType: 'json', success: function(data) {} }); return false; } $(document).ready(function(){ faq(); });