Comments (8)
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.
@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.
@Brunoaw like so: https://github.com/mrfoto/swipebox/blob/master/vendor/assets/javascripts/swipebox.js
from swipebox.
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.
from swipebox.
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.
/**
* 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.
Plz Help insert mail form !!
from swipebox.
Related Issues (20)
- Is it possible to handle mouse scroll and switch images on such events?
- sorry, I posted by mistake
- Code Injection Vulnerability
- How do you make the top bar with the title and bottom bar with the navigation button NEVER go away ? HOT 1
- swipebox con videos .mp4
- Autoplay Slideshow
- touch devices do not display all slides [fix]
- Not working with jquery 3.x.x HOT 2
- Video does not autoplay in Chrome
- Adding links to images and/or caption text
- Getting black overlay screen on every click HOT 29
- Can not close Swipebox HOT 1
- Mobile Browser Swipe Bugfix
- JQMIGRATE: jQuery.isArray is deprecated; use Array.isArray HOT 3
- Close on Tap
- Popup Close button click event not working HOT 2
- Not able to Pause the YT video after playing it on mobile
- Problem with Multiple Galleries on Same Page
- Flickering and sporadic streak at the top of the slider HOT 5
- how to change the location of the toggle arrows?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swipebox.