Revision: 19675
Updated Code
at October 28, 2009 10:48 by almazom
Updated Code
//ajax function------------------------------------- function ajax_will_paginate(s){ $.ajax({ type: "POST", url: "index/blog_paginate?page="+s, success: function(msg){ $("div.blog[style='display: block;']").html(msg); replace_paginate_links(); } }); } // replace links function--------------------------- function replace_paginate_links(){ $('div.pagination a').each(function(){ var new_attr = "ajax_will_paginate" var get_href_a = $(this).attr('href').split('='); var get_href = get_href_a[get_href_a.length-1] $(this).attr('href',"#") $(this).attr('onclick',"ajax_will_paginate('"+get_href+"'); return false;") }) } $(document).ready(function(){ replace_paginate_links() })
Revision: 19674
Updated Code
at October 28, 2009 10:48 by almazom
Updated Code
//ajax function function ajax_will_paginate(s){ $.ajax({ type: "POST", url: "index/blog_paginate?page="+s, success: function(msg){ $("div.blog[style='display: block;']").html(msg); replace_paginate_links(); } }); } // replace links function function replace_paginate_links(){ $('div.pagination a').each(function(){ var new_attr = "ajax_will_paginate" var get_href_a = $(this).attr('href').split('='); var get_href = get_href_a[get_href_a.length-1] $(this).attr('href',"#") $(this).attr('onclick',"ajax_will_paginate('"+get_href+"'); return false;") }) } $(document).ready(function(){ replace_paginate_links() })
Revision: 19673
Updated Code
at October 28, 2009 10:46 by almazom
Updated Code
// ÃÂ�ð ��ýúÑ�øÑ� ÷ðÑ�òðÑ�Ñ�òðõÑ� ýþüõÑ� ���ðýøÑ�Ñ� ø þÑ�ÿÑ�ðòûÑ�õÑ� ðÑ�úÑ� ÷ðÿÑ�þÑ�. // Ã�þûÑ�Ñ�õýýÑ�õ �õ÷Ñ�ûÑ�Ñ�ðÑ� òÑ�Ñ�ðòûÑ�õÑ� ò "div.blog" // ø ò úþýÑ�õ òÑ�÷Ñ�òðõÑ� ��ýúÑ�øÑ� ÷ðüõýÑ� ���ûþú function ajax_will_paginate(s){ $.ajax({ type: "POST", url: "index/blog_paginate?page="+s, success: function(msg){ $("div.blog[style='display: block;']").html(msg); replace_paginate_links(); } }); } // ÃÂ�ð ��ýúÑ�øÑ� ÷ðüõÑ�ðõÑ� ���ûúø, óõýõÑ�øÑ�Ñ�õüÑ�õ "will_paginate" // þýð ýðÿÑ�ðòûÑ�õÑ� øÑ� ýð ðÑ�úÑ� ��ýúÑ�øÑ�, þÿøÑ�ðýýÑ�Ñ� òÑ�Ñ�õ function replace_paginate_links(){ $('div.pagination a').each(function(){ var new_attr = "ajax_will_paginate" var get_href_a = $(this).attr('href').split('='); var get_href = get_href_a[get_href_a.length-1] $(this).attr('href',"#") $(this).attr('onclick',"ajax_will_paginate('"+get_href+"'); return false;") }) } $(document).ready(function(){ replace_paginate_links() })
Revision: 19672
Updated Code
at October 28, 2009 10:46 by almazom
Updated Code
// Ðта Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð·Ð°Ñ…Ð²Ð°Ñ‚Ñ‹Ð²Ð°ÐµÑ‚ номер Ñтраницы и отправлÑет аÑÐºÑ Ð·Ð°Ð¿Ñ€Ð¾Ñ. // Полученные результат вÑтавлÑет в "div.blog" // и в конце вызывает Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð·Ð°Ð¼ÐµÐ½Ñ‹ ÑÑылок function ajax_will_paginate(s){ $.ajax({ type: "POST", url: "index/blog_paginate?page="+s, success: function(msg){ $("div.blog[style='display: block;']").html(msg); replace_paginate_links(); } }); } // Ðта Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð·Ð°Ð¼ÐµÑ‰Ð°ÐµÑ‚ ÑÑылки, генерируемые "will_paginate" // она направлÑет их на аÑÐºÑ Ñ„ÑƒÐ½ÐºÑ†Ð¸ÑŽ, опиÑанную выше function replace_paginate_links(){ $('div.pagination a').each(function(){ var new_attr = "ajax_will_paginate" var get_href_a = $(this).attr('href').split('='); var get_href = get_href_a[get_href_a.length-1] $(this).attr('href',"#") $(this).attr('onclick',"ajax_will_paginate('"+get_href+"'); return false;") }) } $(document).ready(function(){ replace_paginate_links() })
Revision: 19671
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 28, 2009 10:41 by almazom
Initial Code
function ajax_will_paginate(s){ $.ajax({ type: "POST", url: "index/blog_paginate?page="+s, success: function(msg){ $("div.blog[style='display: block;']").html(msg); replace_paginate_links(); } }); } function replace_paginate_links(){ $('div.pagination a').each(function(){ var new_attr = "ajax_will_paginate" var get_href_a = $(this).attr('href').split('='); var get_href = get_href_a[get_href_a.length-1] $(this).attr('href',"#") $(this).attr('onclick',"ajax_will_paginate('"+get_href+"'); return false;") }) }
Initial URL
Initial Description
Initial Title
will_paginate with jquery ajax / поÑтаничный вывод в Rails Ñ will_paginate и Jquery
Initial Tags
rails, jquery
Initial Language
Rails