Solved

Jquery cycle to full screen

Posted on 2013-10-25
4
364 Views
Last Modified: 2013-11-17
Hello Experts,

I am using jQuery cycle for my slideshows. I would like to have a full screen mode as an option. The slideshows are in the fixed width and height container so I am trying to add the full screen option.

I saw this demo here: http://blog.aaronvanderzwan.com/2012/07/maximage-2-0/#demo which i think is really cool yet this is a full screen from the beginning :-)

Is there a way to integrate this from a small fix width slideshow to fullscreen?

Thanks guys!
0
Comment
Question by:Refael
  • 2
4 Comments
 
LVL 30

Assisted Solution

by:Alexandre Simões
Alexandre Simões earned 250 total points
ID: 39600101
Basically the "trick" is done with this:
element.style {
    height: 448px;
    width: 1452px;
}
body .mc-cycle {
    left: 0;
    overflow: hidden;
    position: fixed;
    top: 0;
    z-index: -1;
}

Open in new window

Just set your slider div dimensions to fill the window and with a position:fixed starting at the top left corner.
Changing view will be as easy as changing the classes applied to the container div.
0
 

Author Comment

by:Refael
ID: 39600111
Hi AlexCode :-)

I am not sure i understand. Can you maybe provide a quick example?

Thank you!
0
 
LVL 58

Accepted Solution

by:
Gary earned 250 total points
ID: 39601275
This is the theory - without real code to base this on there is no point trying to make a real example

Add a button
<button id="fullscreen">Full Screen</button>

Add CSS class setting the container full screen (make sure it comes after the initial container class)
.fullscreen-class {width:100%;height:100%}

Then some Jquery
$("#fullscreen").click(function(){
     $("#container").toggleClass("fullscreen-class")

})
0
 

Author Closing Comment

by:Refael
ID: 39654613
Thanks guys
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question