abhiomkar / portfolio-js

Tiny JavaScript carousel library with horizontal scrolling and all the goodness.
https://portfoliojs.com
80 stars 30 forks source link

Arrow Alignment & Centering Main Image #44

Open brittanysteed opened 10 years ago

brittanysteed commented 10 years ago

Hey Abhiomkar!

Thanks for the awesome plugin!

I'm having two issues:

This is all without any tinkering. Just copying and pasting the setup from your site. I didn't even add my own images yet. I can't figure out what it is!

Thanks for anyone's time in advance!

abhiomkar commented 10 years ago

Hello! could you please share the markup and browser information?

Thanks!

abhiomkar commented 10 years ago

btw, the option is offsetLeft (not offset.left).

brittanysteed commented 10 years ago

Sure! Thanks for the timely response! You can see an edited version at www.brittanysteed.com

and browser info? like my IP address? 68.202.205.202

<div id="gallery-container" style="padding-bottom:5%">
<div id="gallery">
        <img data-src="images/gallery/1.jpg" />
        <img data-src="images/gallery/2.jpg" />
        <img data-src="images/gallery/3.jpg" />

</div>
</div>

<script>
    $(document).ready(function() {
            var p = $("#gallery").portfolio({
                enableKeyboardNavigation: true, // enable / disable keyboard navigation (default: true)
                loop: true, // loop on / off (default: false)
                easingMethod: 'easeOutQuad', // other easing methods please refer: http://gsgd.co.uk/sandbox/jquery/easing/
                height: '400px', // gallery height
                width: '100%', // gallery width in pixels or in percentage
                lightbox: false, // dim off other images, highlights only currently viewing image
                showArrows: true, // show next / prev buttons
                logger: false, // for debugging purpose, turns on/off console.log() statements in the script
                spinnerColor: '#000', // Ajax loader color
                offsetLeft: -320, // position left value for current image
                opacityLightbox: '0.1' // opacity of other images which are not active
            });
            p.init();
    });
</script>

I also have this in my css if it's relevant

#gallery {
    overflow-x: visible !important;
    font-size: 0;
}