diff --git a/.DS_Store b/.DS_Store
index 9118bc5..0bcf192 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/images/data.png b/images/data.png
new file mode 100644
index 0000000..d302a13
Binary files /dev/null and b/images/data.png differ
diff --git a/index.html b/index.html
index c7e712e..252c5f2 100644
--- a/index.html
+++ b/index.html
@@ -8,16 +8,21 @@
-
+
+
+
+
+
+
-
-
-
+
+
+
@@ -59,6 +64,7 @@
+
- page 1
diff --git a/js/main.js b/js/main.js
index a6b0849..cc56396 100644
--- a/js/main.js
+++ b/js/main.js
@@ -1,4 +1,6 @@
-
+viewStatus= "story" /* data story */
+pages= 0
+totalPages=3;
window.onload = function() {
console.log("on load")
width = 1000,
@@ -27,36 +29,59 @@ function loadPageTemplates(){
console.log("load templates")
$('#page-1').load("templates/page1.html",function(){
- var modal = new jBox('Modal', {
- attach: '#map-btn-page-1',
- content: $('#map-page-1'),
- closeButton: 'box'
- });
+ loadModalEvent(1);
+ counterLoading();
})
$('#page-2').load("templates/page2.html",function(){
- var modal = new jBox('Modal', {
- attach: '#map-btn-page-2',
- content: $('#map-page-2'),
- closeButton: 'box'
- });
+ loadModalEvent(2);
+ counterLoading();
})
$('#page-3').load("templates/page3.html",function(){
- var modal = new jBox('Modal', {
- attach: '#map-btn-page-3',
- content: $('#map-page-3'),
- closeButton: 'box'
- });
+ loadModalEvent(3);
+ counterLoading();
})
$('#page-4').load("templates/page4.html",function(){
- var modal = new jBox('Modal', {
- attach: '#map-btn-page-4',
- content: $('#map-page-4'),
- closeButton: 'box'
- });
+ loadModalEvent(4);
+ counterLoading();
})
turnEventsOn();
+
+}
+
+function loadModalEvent( i){
+ var modal = new jBox('Modal', {
+ attach: '#map-btn-page-'+i,
+ content: $('#map-page-'+i),
+ closeButton: 'box'
+ });
+}
+
+
+function counterLoading(){
+ pages++;
+
+ if(pages>totalPages){
+ $('.menu-content').on("click",'.switchMode', function(e){
+ console.log("menu content")
+ if(viewStatus=="story") viewStatus="data"
+ else{
+ viewStatus="story"
+ }
+
+ if(viewStatus=="story"){
+ $('.story-content').show();
+ $('.data-content').hide();
+ $('.menu-content .switchMode').empty().html("ver datos")
+ }
+ else{
+ $('.story-content').hide();
+ $('.data-content').show();
+ $('.menu-content .switchMode').empty().html("ver historia")
+ }
+ })
+ }
}
function turnEventsOn(){
@@ -64,6 +89,4 @@ function turnEventsOn(){
$('.btn-navigation.active').removeClass('active')
$(this).addClass('active')
})*/
-
-
- }
+}
diff --git a/templates/page1.html b/templates/page1.html
index 687dded..68c8dcc 100644
--- a/templates/page1.html
+++ b/templates/page1.html
@@ -2,17 +2,25 @@
diff --git a/templates/page2.html b/templates/page2.html
index dcd7692..04c47f9 100644
--- a/templates/page2.html
+++ b/templates/page2.html
@@ -2,8 +2,12 @@
diff --git a/templates/page3.html b/templates/page3.html
index 539f9b1..53dbf5f 100644
--- a/templates/page3.html
+++ b/templates/page3.html
@@ -1,10 +1,13 @@
-
- pagina 3
+
+
+
+
+