Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(function($){
- var $content = $('#alphebatized');
- var load_posts = function(l){
- if(l === ''){
- l='A';
- }
- $.ajax({
- type: "GET",
- data: {letter: l},
- dataType: "html",
- url: "http://localhost/permendrain/wp-content/themes/animeSeries/first-letter.php",
- beforeSend: function(){
- $content.fadeOut('fast');
- },
- success: function(data){
- $data = $(data);
- if ($data.length){
- $data.hide();
- $content.html('');
- $content.append($data);
- $content.fadeIn('fast');
- $data.fadeIn('fast');
- }
- },
- error: function(jqXHR, textStatus, errorThrown) {
- alert(jqXHR + " :: " + textStatus + " :: " + errorThrown);
- }
- });
- }
- $('#sort-by a').click(function() {
- var l = $(this).attr('name'); //letter from button
- load_posts(l);
- });
- load_posts('');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement