AJAX html2canvas - take screenshot of a visible div and of a div with "display: none;"

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

html2canvas - take screenshot of a visible div and of a div with "display: none;"

Hello guys,

I need some advice about a issue I'm dealing with for the past 2 days

I trying to take a screenshot of a specific div which holds a couple of images that change every refresh.
I've managed to do that, using the following script - html2canvas (link: http://html2canvas.hertzen.com/)

Now, the script works just perfect until a specific point...

I have 2 div elements called "Tab_1" and "Tab_2", and both of them are been displayed using another .js script (for creating tabs).
Actualy, the tabs are created using the CSS-display options (the active one has "display: block;" - and the inactive one has "display: none;")

This is where the html2canvas script kinda fails....
It will take a screenshot of the images under the <div> tag which has the attribute "display: block" (the active tab) but it will not take a screenshot of the image under the <div> tag which has the attribute "display: none" (the inactive tab)

Basically this is my issue...

I want to call the function and be able to take the screenshot of both tabs (the active and the inactive)

I haven't done much more than play with canvas for 5 minutes, but I suspect that the solution will require saving the id of the currently visible <div>, then sequentially making each one visible and saving it before finally restoring the original settings.