Photos gallery for full screen website - javascript

I have a website mainly for read comic book online.
So when upload content to web page, most of them are images. My content will be something like this.
<p>
<img src="img1">
<h1>Some text</h1>
<img src="img2">
<img src="img3">
</p>
I want when user click img1 it will show full screen. Click next button will show img2 and so on.
is there any photo library for this job.

Yes, Of course.
Very fewer people are familiar with this awesome javascript gallery library. I hope you know basic javascript.
Read their docs and you will master that just in few minutes. Here is their link below.
For better understanding try to understand their codes in Codepen.
Click here to go their official page

If you check out this Stack Overflow link, there are several examples of photo galleries that you can build upon.
You can click JSFiddle Photo Gallery to see the code and run the example.
You can also look at the other examples on the Stack Overflow link. This code is free to use and modify.

Related

How can I add a close button to a html video popup?

I have an image on my site, and when you click on the image, a video pops up and starts playing. I am wondering how I can add a close button on this video to go back to website rather than pressing back.
I'm pretty experienced with HTML CSS but very new to JS.
This is the code that causes the popup video.
<div class="image-wrapper">
<a href="assets/video.mp4">
<img src="assets/img.png">
</a>
</div>
Thanks for any help here.
I suggest that, you add all the code. HTML/CSS/JS and so, we can help you.
I recommend that, a snippet, that stackoverflow eases you.
enter image description here
The snippet is:
snippet
If you are new in JS. I recommend work with the framework jQuery.

WordPress custom theme live preview and customization is not saving current preview

I am developing a website with Wordpress. I am using gt3themes' corp theme. I have managed to customize layout of my site, but when it comes to partners and/or featured posts sections, theme's javascript is not working as expected. You can see the preview of the site. I have tried to deactivate the all of my active plugins, but it still not working. However, when i live preview my theme, it is showing the layout as expected, but when i save and publish it, it is becoming as before.
Before activation
After activation
As you can see here, in the first image, it is a live preview and, for example, Our partners section is showing only 5 partners and the rest of them are hidden. Whereas, in the second image, all partners in this section is visible, just overflow made hidden.
The same problem with Latest News and Announcements section.
I have reviewed javascript files, and cannot differentiate from theme's live demo which you can find here.
Any suggessions that can solve my problem would be highly appreciated.
Thanks.
I´m actually not really sure how we would be able to really help you without the files of the theme. Altough i just had a quick overlook between your website and the theme preview at http://www.gt3themes.com/wordpress-themes/corp/, and it seems to me you have a problem with the carousel control, that is on the right side of the partner section in the preview.
also you have more js loaded than their preview.
Looks like a typical failure of some javascript not loaded right or not loaded at all.
Also you are loading two times the jquery library in different versions, one in the header, one in the footer. Try to solve this issues.

Displaying hidden images in the Pinterest Pin Preview pop-up with addThis plugin

I am currently unable to display images on the Pinterest Pin Preview screen that are hidden (with a display: none) on my page. On my page where the "Pin It" button sits there is a standard carousel, but I am looking for all images within that carousel to be shown on the Pin Preview pop-up.
I have the script include on my page as below:
<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#username=xa-USERNAMEINHERE"></script>
<a class="addthis_button_pinterest left last" title="Pinterest"> </a>
When investigating into this issue I came across this post from 2012, which is essentially the same issue I am experiencing. However there is no follow up to it.
I have experimented with the image_container and image_include properties of addthis_config, but essentially I can't seem to find a way to show the hidden images.
Has anyone came across this problem?
I received a reply back from Pinterest Support, as follows:
Hi,
We do offer similar functionality when using our Pin It button in
"Any Image" mode. You can see the code used to generate it by going to
our Widget Builder:
http://business.pinterest.com/widget-builder/#do_pin_it_button
However, there's no way for us to automatically include hidden images.
The one additional functionality that we do offer is picking up the
image stored in the og:image tag on your page, if it exists, so if you
populate that tag with one of the hidden images, it would show up
first in the list. Hope this helps! Bill | Developer Support Engineer
So it seems that as of May 2014 this is not possible.

Video on popup page still playing even when I close the popup layer

I have a popup layer on my website that show the latest news on it. Now I want to embed a YouTube video on it, that plays once the user open the website. And I would like it to stop playing after the user close the popup page. I have tried SoundCloud player and it stops when I close it.
Here is the live link.
You can also download the file source file on here (.zip):
Source Files
So I want to make the video stops playing when the user closes the popup page.
Any idea?
Thanks in advance.
Friend's
Don't try to close the facebox/fancybox pop up window. Try to create a container that holds the video file/embed code. After clicking on Close link, just remove the HTML of that embed/video file container.
Ex. <div id="myVideoFilePlay">Video File/Embed Data</div>
Script File:
document.getElementById('remodeVideoPlayer').innerHTML ="";
After that close the fancy box
Here is some information about the auto-play feature for embedding in YouTube.
http://support.google.com/youtube/bin/answer.py?hl=en&answer=1181821
"To make it autoplay, just put &autoplay=1 after the video ID so it looks like this:"
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/XXXXXXX&autoplay=1"></param>
<embed src="http://www.youtube.com/v/XXXXXXX&autoplay=1" type="application/x-shockwave-flash" width="425" height="350">
</embed></object>
As for stopping the video, I advise you have a look here and set up some simple functions to do the pausing upon clicking "X". See: How to pause a YouTube player when hiding the iframe?
EDIT: Added more info..
I can see you set your jQuery to #dialogjj upon the site loading, and then the HTML is inside of the div so setting it to display:none; it wont stop it playing. I have an idea to make it work - there may be a better one out there with nicer jQuery but this works fine. I feel that no one is going to reply further due to the way the question was asked/not very easy to look into unfortunately. That is perhaps why you got a downvote on this question, have a look how other people ask questions here for future guide, its generally not just giving links to your website expecting people to look, instead try to pin point your problem adn what you have tried so other people can have a clue about it, but we all start somewhere so dont worry :).
My idea is that you actually set the contents FOR #dialogjj with jQuery (so the embed code is put in via the JS file and not the HTML page) and in that same way you can actually append it to get rid of that embed code. I have set up a simple JSfiddle that does this in the same fashion as you want. Its up to you to merge it into your code though :)
JS FIddle link http://jsfiddle.net/ivandude/vLrvA/2/
If you like the solution please click tick as the answer :D my first one maybe.. haha
The answer was really easy. When I used the old object embed code, it just worked. Thanks for the suggested solution but it works for iframe. But does not need any additional code.

Photo gallery like picasa or facebook

I create a photo gallery like picasa or facebook have and already have done a server part. Now faced with an issue about displaying it. In other words, there's a page contains some small pictures (in fact, thumbnails). I'd like a "windows" contains a big picture to appear by clicking a picture instead of redirecting to other page.
For example. like here
So please recommend me something or give me an example of how to make it.
There are a lot of image galleries online. Here is example of one. Click on each of the rounded buttons (1-5) to see demos.

Categories