"turnjs-magazine" how i replace from image pages to html pages? - turnjs

i like turnjs-MAGAZINE,
but I need your help for fix:
1- how does to change from IMAGE pages to HTML pages?
code from
http://www.turnjs.com/samples/magazine1/js/magazine1.js
or download: http://www.turnjs.com

As the Ref Link Indicate : https://github.com/blasten/turn.js/issues/306
we need to perform the following steps
1) Remove following HTML (As re the static reference to pages )
<div depth="5" class="hard">
<div class="side"></div>
</div>
<div depth="5" class="hard front-side">
<div class="depth"></div>
</div>
<div class="own-size"></div>
<div class="own-size even"></div>
2) remove respective CSS as address in ques
.sj-book .p1,
.sj-book .p2,
.sj-book .p3,
.sj-book .p111,
.sj-book .p112{
background-color:white;
background-image:url(../pics/book-covers.jpg) !important;
}
3) copy respective pages to pages folder with the name
Page1.html
Page2.html
and so on..

Related

In JSSOR, how to access the current caption via Javascript?

I would like to pass a value from a slide out of JSSOR to other parts of the DOM.
Markup:
<div class="slide">
<img data-u="image" src="bilder/bild2.jpg" />
<div class="caption" data-u="caption" ><p>Caption text</p></div>
</div>
JS:
jssor_slider1.$On($JssorSlider$.$EVT_PARK,function(slideIndex,fromIndex){
$(".outer-caption").text(currentCaption);
});
The custom JSSOR Event, EVT_PARK, works fine. But what's missing is how to get the caption of the current slide and put it into the variable currentCaption. How to do that?
And if so, where could I have found that out on my own?
Please have a full test of following code,
<div class="slide">
<img data-u="image" src="bilder/bild2.jpg" />
<div class="caption" data-u="caption" id="caption-slide-0"><p>Slide 0 Caption</p></div>
</div>
jssor_slider1.$On($JssorSlider$.$EVT_PARK,function(slideIndex,fromIndex){
$("#outer-caption").text($("#caption-slide-" + slideIndex).text());
});

Pagination Current page/Total pages?

I am in the process of making my first Tumblr theme and I'm a little confused about pagination.
I'm trying to make my pagination something like this:
Where there is (current page/total pages) with "NEXT" as the next page link on its right
And when you are on the other pages, a "PREV" as the previous page link appears on its left.
CSS
#pagi {
position:absolute;
z-index:10;
margin-top:18px;
width:130px;
text-align:center;
text-transform:uppercase;
}
#pagi a {
text-decoration:none;
}
HTML
{block:Pagination}
<div id="pagi">
{block:PreviousPage}
PREV
{/block:PreviousPage}
{block:JumpPagination length="3"}
{block:CurrentPage}
({PageNumber})
{/block:CurrentPage}
{block:JumpPage}
<a class="jump" href="{URL}">{PageNumber}</a>
{/block:JumpPage}
{/block:JumpPagination}
{block:NextPage}
NEXT
{/block:NextPage}
</div>
{/block:Pagination}
I thought i did it right, but instead it turned out like this:
What did i do wrong?
Current Page and Total Pages
Sadly, the jump pagination won't work here. {CurrentPage} will give you the current page number. {TotalPages} will give you the total page count.
{block:Pagination}
<div id="pagi">
<!-- Prev Page Link -->
{block:PreviousPage}
PREV
{/block:PreviousPage}
<!-- Page Counter -->
<span class="counter">({CurrentPage}/{TotalPages})</span>
<!-- Next Page Link -->
{block:NextPage}
NEXT
{/block:NextPage}
</div>
{/block:Pagination}

How to define the link of footer bar icons? HTML iPhone App

Here is the code of my HTML iPhone app: http://summerblast.pt/iphone/code.html
I would like the icons of the bar to have a link. Lets say the first btn called "Emissão" will redirect to http://www.summerblast.pt/player.html
How can I do That?
Go to your ul tag with the id tabSelector and under it you'll find the li with each tab. Surrounding the contents of each li is a a tag. If you add href="[insert link to site here]", the contents of the li and therefor the icons will be clickable and link to the site.
An example of the edited tag would be this: <a data-bind="click: selectTab" href = "www.google.com"> Notice the href
Here would be the full contents of the li for the first icon:
<li data-bind="attr: {'data-tabid': TabId}" data-tabid="1263865">
<a data-bind="click: selectTab" href = "www.google.com">
<img data-bind="attr: {src: TabId == $root.CurrentTab().topLevelSectionID ? TABU.getImageUrl(SelectedTabIcon, $element) : TABU.getImageUrl(TabIcon, $element)}" src="http://myapp.is/image/aHR0cDovL3RhYi1iYXNlLXVybC50aGVhcHBidWlsZGVyLmNvbS9hcHBidWlsZGVyYXNzZXRzL2Fzc2V0cy90YWJiYXJfaWNvbnMvaW9zX3NlbGVjdGVkLzMyMC9SZXNpc3RvcnMucG5n/0/0">
<div data-bind="text: TabTitle">Emissão</div>
</a>
</li>

facebook like button not showing in Mozilla but working fine in chrome & safari

I have site where i used addthis sahring icons code to display the scocial sharing icons. Fb like button is not coming in mozilla but it is working fine in chrome & safari.
I used the below code for displaying the sharing icons as get from addthis site https://www.addthis.com/get/sharing?frm=hp#.UDrCVsHib-s
<div class="addthis_toolbox addthis_default_style ">
<div id="fb-root"></div><a class="addthis_button_facebook_like" fb:like:layout="button_count" ></a>
<a class="addthis_button_tweet" ></a>
<a class="addthis_button_pinterest_pinit" ></a>
<a class="addthis_counter addthis_pill_style" ></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-5022bfc615892c77"></script>
Use this Code for sharing on Facebook, i have use this tons of time and each time i get success, change the sequence if you want...
<span class='st_fblike_vcount'></span>
<span class='st_twitter_vcount'></span>
<span class='st_plusone_vcount'></span>
<span class='st_email_vcount'></span>
<span class='st_sharethis_vcount'></span>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "782110c4-838d-408f-8393-98897995ced4"}); </script>
Go to wp-content/plugins/facebook-like-box-responsive/facebook-like-responsive.css
e.g http://blogs.tarungupta.info/wp-content/plugins/facebook-like-box-responsive/facebook-like-responsive.css
remove !important
/* To fill the container and nothing else */
.fb_iframe_widget, .fb_iframe_widget span, .fb_iframe_widget span iframe {
width: 100%;
}
/* To fill the container and nothing else */
.fb_iframe_widget, .fb_iframe_widget span, .fb_iframe_widget span iframe {
width: 100% !important;
}

Show one .png image over another .jpg image

I have the following code:
<img style="background: url(./image/data/logo.png) no-repeat top right" src="./image/data/picture.jpg" />
As it is now, it shows the logo.png under the picture.jpg image. How can I make it to be shown above the .jpg image?
Thanks.
You must use 2 images to do that. The img must be with position absolute (The one that you want to be over the other). Don't forget that the container must have position:relative in order to contain the absoluted png.
Here is the example:
http://jsfiddle.net/jNpaH/
The html tags:
<div class="image">
<img src="http://upload.wikimedia.org/wikipedia/commons/7/7a/Basketball.png"
class="png-over" />
<img src="http://upload.wikimedia.org/wikipedia/commons/4/42/Papua_New_Guinea_map.png"
/> </div>
The styles:
.image{position:relative}
.png-over{position:absolute; top:0; left:0}
The problem with that technique is that your code becomes spammed with the image tags.
One way of solving it with jQuery is to find each div container with the class 'images' and prepend to each one the image tag.
Here is the example:
http://jsfiddle.net/jNpaH/2/
According to your code I assume that you prefer to have a short html code. But it is impossible to have an image_tag with a background covering it.
The cleanest way is to use jQuery:
This is the final code:
http://jsfiddle.net/QyMkh/
First put a div that will contain all your images. The div must have a class, the images don't require it necessarily.
<div class="image">
<img src="http://upload.wikimedia.org/wikipedia/commons/4/42/Papua_New_Guinea_map.png" />
<img src="http://upload.wikimedia.org/wikipedia/commons/4/42/Papua_New_Guinea_map.png" />
<img src="http://upload.wikimedia.org/wikipedia/commons/4/42/Papua_New_Guinea_map.png" />
</div>
Then add this jQuery block in the html before the closing </body>:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
// store in a variable the url of the image that will be used as background
var url = 'http://upload.wikimedia.org/wikipedia/commons/7/7a/Basketball.png';
// select every image_tag that is children of the div with the class 'image'
jQuery('.image img').each(function() {
// every child image will be wrapped inside generated divs with a class 'img-wrap'
$(this).wrap('<div class="img-wrap"></div>');
});
// After the images are wrapped, insert the image tag that will work as background, note that instead of using the source I'm using the variable that stores it.
$('<img src="' + url + '" class="logo" />').prependTo('.img-wrap');
</script>
Finally add those style declarations to get the desired effect.
<style type="text/css">
.img-wrap{position:relative}
.img-wrap img.logo{position:absolute; top:0; left:0}
</style>
This code will keep your html documents with no unnecesary markup when you try to edit next time.
An advantage of using an image_tag as a background, is that with css you can resize its width and height. Try adding this new rule of stylesheet:
.img-wrap img.logo { height: 170px; left: 75px; position: absolute; top: 50px; width: 170px}
To end this, if you want more flexibility, for example you don't want the image_tags be container in a div, do this actions: replace this line of the jQuery block:
jQuery('.image img').each(function() {
with this
jQuery('.image').each(function() {
and add a class="image" to each
<img class="image">