Code Monkey home page Code Monkey logo

Comments (8)

brutaldesign avatar brutaldesign commented on July 21, 2024

Hi,

Thanks for your support!
Unfortunately, this feature is not in the pipeline at the moment, but definitely a good idea for the future

Cheers

from swipebox.

miharekar avatar miharekar commented on July 21, 2024

@Brunoaw (and whoever might want this in the future) It's fairly easy to do.

JS (line 34) add swipebox-count

html = '<div id="swipebox-overlay">\
        <div id="swipebox-slider"></div>\
        <div id="swipebox-caption"></div>\
        <div id="swipebox-action">\
            <a id="swipebox-close"></a>\
            <div id="swipebox-count"></div>\
            <a id="swipebox-prev"></a>\
            <a id="swipebox-next"></a>\
        </div>\
</div>';

JS (line 426) add js to update the count

$('#swipebox-count').text((index+1) + '/' + elements.length)

and then some CSS

#swipebox-count {
  text-align: center;
  color: white!important;
  font-size: 15px;
  line-height: 43px;
  font-family: Helvetica, Arial, sans-serif;
}

With some additional work you could make it optional via settings but I'm not gonna go into that.

from swipebox.

miharekar avatar miharekar commented on July 21, 2024

@Brunoaw like so: https://github.com/mrfoto/swipebox/blob/master/vendor/assets/javascripts/swipebox.js

from swipebox.

bdadev avatar bdadev commented on July 21, 2024

Perfect Miha.

Thanks for the support and the great contribution web.

Thanks!

2013/10/21 Miha Rekar [email protected]

@Brunoaw https://github.com/BrunoAW like so:
https://github.com/mrfoto/swipebox/blob/master/vendor/assets/javascripts/swipebox.js


Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-26714485
.

from swipebox.

miharekar avatar miharekar commented on July 21, 2024

@Brunoaw Made a PR - #69 👅

from swipebox.

atragan avatar atragan commented on July 21, 2024

i can not seem to find all this functionality in the downloadable files for the project. Are the changes merged?

in which function should i add the JS function for updating the slider counter?

Thank you in advance,
Andreas

from swipebox.

1ApSH avatar 1ApSH commented on July 21, 2024
        /**
         * Set link title attribute as caption
         */
        setTitle : function ( index ) {
            var title = null;

            $( '#swipebox-title' ).empty();

            if ( elements[ index ] !== undefined ) {
                title = elements[ index ].title;
            }

            if ( title ) {
                $( '#swipebox-top-bar' ).show();
                $( '#swipebox-title' ).append( title );
            } else {
                $( '#swipebox-top-bar' ).hide();
            }
            $('#swipebox-count').text((index+1) + '/' + elements.length);
        },

        html = '<div id="swipebox-overlay">\
                <div id="swipebox-container">\
                    <div id="swipebox-slider"></div>\
                    <div id="swipebox-top-bar">\
                        <div id="swipebox-title"></div>\
                    </div>\
                    <div id="swipebox-bottom-bar">\
                        <div id="swipebox-arrows">\
                            <a id="swipebox-prev"></a>\
                                <span id="swipebox-count"></span>\
                            <a id="swipebox-next"></a>\
                        </div>\
                    </div>\
                    <a id="swipebox-close"></a>\
                </div>\
        </div>';

Work Great thx!

from swipebox.

1ApSH avatar 1ApSH commented on July 21, 2024

Plz Help insert mail form !!

from swipebox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.