jquery problem please help me

1 view
Skip to first unread message

Jitesh Sinha

unread,
May 22, 2013, 6:39:15 AM5/22/13
to xamp...@googlegroups.com
I want to pagination through jquery
my script is like below
<script>
$(document).ready(function(){
    $('button#next').click(function(){
        var url = './question-ploter/question-quer.php';
        var data = 1;
        $.post(url,{data:data},function(t){
            $('div.question').html(t.question);
            $('div.answer ul li#option1').html(t.option1);
            $('div.answer ul li#option2').html(t.option2);
            $('div.answer ul li#option3').html(t.option3);
            $('div.answer ul li#option4').html(t.option4); 
        },'json');
        return false;
    });
});
</script>

i want a loop data to 1 to 30 numbers on my button click event So how it will be consider for the same Please help me......

PRASANT KUMAR SUMAN

unread,
May 22, 2013, 7:01:54 AM5/22/13
to xamp...@googlegroups.com
YOu can increase the value of data variable using data++  before returning false ... so when user again press the next button variable data has value one greater and stop if its value is 30.
If you could share all file i can try to solve your objective else you can try !

ℙґα﹩@η☂ Ḳüღαґ $üмαη


--
Create filter of mails from this group http://www.wikihow.com/Create-a-Filter-in-Gmail
Manage your settings from http://groups.google.com/groups/mysubs?pli=1
---
You received this message because you are subscribed to the Google Groups "PHP Developers' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xamppdev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jitesh Sinha

unread,
May 23, 2013, 2:08:57 AM5/23/13
to xamp...@googlegroups.com
Thanks Prasant but it does not work.
Reply all
Reply to author
Forward
0 new messages