Comments on: BxSlider slides counter http://www.antimath.info/jquery/bxslider-slides-counter/ thoughts: simple; Mon, 17 Sep 2018 19:31:06 +0000 hourly 1 https://wordpress.org/?v=4.9.8 By: Gozde http://www.antimath.info/jquery/bxslider-slides-counter/#comment-312017 Tue, 14 Apr 2015 10:21:31 +0000 http://www.antimath.info/?p=271#comment-312017 Thanks for the solution.

]]>
By: Mihai http://www.antimath.info/jquery/bxslider-slides-counter/#comment-311983 Sat, 28 Feb 2015 19:00:20 +0000 http://www.antimath.info/?p=271#comment-311983 What if, you need to display, a full pager and a counter ?

]]>
By: Jay http://www.antimath.info/jquery/bxslider-slides-counter/#comment-311872 Mon, 17 Nov 2014 11:49:13 +0000 http://www.antimath.info/?p=271#comment-311872 $(‘#slideshow’).bxSlider({
pager: true,
pagerType: ‘short’
});

There is already an options in bxslider.

]]>
By: Kakafoni http://www.antimath.info/jquery/bxslider-slides-counter/#comment-311774 Mon, 06 Oct 2014 20:14:09 +0000 http://www.antimath.info/?p=271#comment-311774 Actually I tried using your jquery.bxslider.min.js file (version 4.0) and your code worked perfectly. The problem was that I had been trying it on version 4.1.2. Anyway, thanks for a great post!

]]>
By: Mihai http://www.antimath.info/jquery/bxslider-slides-counter/#comment-311771 Sat, 04 Oct 2014 21:13:49 +0000 http://www.antimath.info/?p=271#comment-311771 Make sure that “slider” is global (use the “var” keyword), and that all the code is executed when DOM is ready, use:
$(document).ready(function(){
// stuff
});

I wouldn’t recommend you to re-declare the slider when ‘onSliderLoad’ is called. That way you will end up having a new slider over the existing one.

]]>
By: Kakafoni http://www.antimath.info/jquery/bxslider-slides-counter/#comment-311770 Fri, 03 Oct 2014 11:29:46 +0000 http://www.antimath.info/?p=271#comment-311770 I don’t know why, but running this code, the console kept telling that “slider” was undefined when trying to execute the onSliderLoad: function. I had to redeclare the “slider”-variable to make it work. Like this:

    onSliderLoad: function (){
        slider = $('#slideshow').bxSlider();
        var slide_count = slider.getSlideCount();
        var slide_curr = slider.getCurrentSlide();
        insertCount(slide_curr,slide_count);
    }

Any idea why? I’m a total newbie, as you might have guessed.

]]>
By: Mihai http://www.antimath.info/jquery/bxslider-slides-counter/#comment-288526 Tue, 22 Apr 2014 19:01:03 +0000 http://www.antimath.info/?p=271#comment-288526 Instead of ‘onSlideNext’ and ‘onSlidePrev’ callbacks, use ‘onSlideAfter’. Updated code in the article.

]]>
By: Vitaliy http://www.antimath.info/jquery/bxslider-slides-counter/#comment-285971 Thu, 17 Apr 2014 10:32:27 +0000 http://www.antimath.info/?p=271#comment-285971 Mihai, hello! Tell me, please. If I click on paginator – slide is changing, but number isn’t. How to change the current slider number, if I click on point in paginator?

]]>
By: Mihai http://www.antimath.info/jquery/bxslider-slides-counter/#comment-285716 Wed, 16 Apr 2014 14:59:41 +0000 http://www.antimath.info/?p=271#comment-285716 I haven’t took this possibility into account…
DestroySlider() would’ve been my first thought too, but as the bxSlider documentation states, reloadSlider() might be a more appropriate choice when dealing with adding/removing slides on the fly.

]]>
By: Jon Wallace http://www.antimath.info/jquery/bxslider-slides-counter/#comment-285598 Wed, 16 Apr 2014 10:52:58 +0000 http://www.antimath.info/?p=271#comment-285598 This appears to be because the first original slider is still in the code and auto advancing so messing up the new sliders slider counter… any way to kill the first slider? destroyslider does not seem to work…

]]>
By: Jon Wallace http://www.antimath.info/jquery/bxslider-slides-counter/#comment-285574 Wed, 16 Apr 2014 09:55:16 +0000 http://www.antimath.info/?p=271#comment-285574 Great code – quick question though – I have added the ability to filter my bxslider and reload it with some of the LIs removed – I therefore need my counter to refresh – currently it gets confused between the original values for slide_curr and slide_count and the new ones – e.g. on initial load we have 30 slides, then after filtering it could be 5, the counter shows as 1/5 then just before the slide transition shows 1/30 – so looks like it has the original slide_count data still stored and being returned.

How can I reset the vars for slide_curr and slide_count?

Thanks

]]>
By: Mihai http://www.antimath.info/jquery/bxslider-slides-counter/#comment-266378 Sun, 16 Mar 2014 17:08:54 +0000 http://www.antimath.info/?p=271#comment-266378 Just replace the ‘slide_count’ in the ‘insertCount’ function with ‘slide_count/n’, where ‘n’ is the number of slides moved in one transition. Re-check the demo.

]]>
By: Suthar PRIYANK http://www.antimath.info/jquery/bxslider-slides-counter/#comment-265250 Fri, 14 Mar 2014 14:38:03 +0000 http://www.antimath.info/?p=271#comment-265250 Nice solution, it worked for me. But for another example, i need to move multiple slides in 1 transition, and with this, your solution is not working. Can you help me with it?

]]>