Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit dd20f0c

Browse files
Merge pull request #23 from ONSvisual/modernizer-placement
Putting modernizer in it's right place
2 parents bb148be + b59b8a0 commit dd20f0c

6 files changed

Lines changed: 135 additions & 125 deletions

File tree

todaycharts/bornabroad/index.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -677,27 +677,7 @@
677677
}// end drawGraphic
678678

679679

680-
//then, onload, check to see if the web browser can handle 'inline svg'
681-
if (Modernizr)
682-
{
683-
684-
// open and load configuration file.
685-
d3.json("config.json", function(error, json)
686-
{
687-
// strore read in json data from config file as as global dvc. variable ...
688-
dvc = json;
689-
readData();
690-
})
691-
692-
} // end if ...
693-
else
694-
{
695-
//use pym to create iframe containing fallback image (which is set as default)
696-
pymChild = new pym.Child();
697-
if (pymChild) {
698-
pymChild.sendHeight();
699-
}
700-
}
680+
701681

702682

703683

@@ -748,7 +728,27 @@
748728
})
749729

750730
}// end function readData()
751-
731+
//then, onload, check to see if the web browser can handle 'inline svg'
732+
if (Modernizr)
733+
{
734+
735+
// open and load configuration file.
736+
d3.json("config.json", function(error, json)
737+
{
738+
// strore read in json data from config file as as global dvc. variable ...
739+
dvc = json;
740+
readData();
741+
})
742+
743+
} // end if ...
744+
else
745+
{
746+
//use pym to create iframe containing fallback image (which is set as default)
747+
pymChild = new pym.Child();
748+
if (pymChild) {
749+
pymChild.sendHeight();
750+
}
751+
}
752752
</script>
753753
</body>
754754
</html>

todaycharts/bornoutmarriage/index.html

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -661,27 +661,7 @@
661661
}// end drawGraphic
662662

663663

664-
//then, onload, check to see if the web browser can handle 'inline svg'
665-
if (Modernizr)
666-
{
667-
668-
// open and load configuration file.
669-
d3.json("config.json", function(error, json)
670-
{
671-
// strore read in json data from config file as as global dvc. variable ...
672-
dvc = json;
673-
readData();
674-
})
675-
676-
} // end if ...
677-
else
678-
{
679-
//use pym to create iframe containing fallback image (which is set as default)
680-
pymChild = new pym.Child();
681-
if (pymChild) {
682-
pymChild.sendHeight();
683-
}
684-
}
664+
685665

686666

687667

@@ -733,6 +713,28 @@
733713

734714
}// end function readData()
735715

716+
//then, onload, check to see if the web browser can handle 'inline svg'
717+
if (Modernizr)
718+
{
719+
720+
// open and load configuration file.
721+
d3.json("config.json", function(error, json)
722+
{
723+
// strore read in json data from config file as as global dvc. variable ...
724+
dvc = json;
725+
readData();
726+
})
727+
728+
} // end if ...
729+
else
730+
{
731+
//use pym to create iframe containing fallback image (which is set as default)
732+
pymChild = new pym.Child();
733+
if (pymChild) {
734+
pymChild.sendHeight();
735+
}
736+
}
737+
736738
</script>
737739
</body>
738740
</html>

todaycharts/firstborn/index.html

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -667,27 +667,7 @@
667667

668668

669669

670-
//then, onload, check to see if the web browser can handle 'inline svg'
671-
if (Modernizr)
672-
{
673-
674-
// open and load configuration file.
675-
d3.json("config.json", function(error, json)
676-
{
677-
// strore read in json data from config file as as global dvc. variable ...
678-
dvc = json;
679-
readData();
680-
})
681-
682-
} // end if ...
683-
else
684-
{
685-
//use pym to create iframe containing fallback image (which is set as default)
686-
pymChild = new pym.Child();
687-
if (pymChild) {
688-
pymChild.sendHeight();
689-
}
690-
}
670+
691671

692672

693673

@@ -739,6 +719,28 @@
739719

740720
}// end function readData()
741721

722+
//then, onload, check to see if the web browser can handle 'inline svg'
723+
if (Modernizr)
724+
{
725+
726+
// open and load configuration file.
727+
d3.json("config.json", function(error, json)
728+
{
729+
// strore read in json data from config file as as global dvc. variable ...
730+
dvc = json;
731+
readData();
732+
})
733+
734+
} // end if ...
735+
else
736+
{
737+
//use pym to create iframe containing fallback image (which is set as default)
738+
pymChild = new pym.Child();
739+
if (pymChild) {
740+
pymChild.sendHeight();
741+
}
742+
}
743+
742744
</script>
743745
</body>
744746
</html>

todaycharts/lifeexp/index.html

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -730,26 +730,7 @@
730730

731731

732732
//then, onload, check to see if the web browser can handle 'inline svg'
733-
if (Modernizr)
734-
{
735-
736-
// open and load configuration file.
737-
d3.json("config.json", function(error, json)
738-
{
739-
// strore read in json data from config file as as global dvc. variable ...
740-
dvc = json;
741-
readData();
742-
})
743-
744-
} // end if ...
745-
else
746-
{
747-
//use pym to create iframe containing fallback image (which is set as default)
748-
pymChild = new pym.Child();
749-
if (pymChild) {
750-
pymChild.sendHeight();
751-
}
752-
}
733+
753734

754735

755736

@@ -801,6 +782,27 @@
801782

802783
}// end function readData()
803784

785+
if (Modernizr)
786+
{
787+
788+
// open and load configuration file.
789+
d3.json("config.json", function(error, json)
790+
{
791+
// strore read in json data from config file as as global dvc. variable ...
792+
dvc = json;
793+
readData();
794+
})
795+
796+
} // end if ...
797+
else
798+
{
799+
//use pym to create iframe containing fallback image (which is set as default)
800+
pymChild = new pym.Child();
801+
if (pymChild) {
802+
pymChild.sendHeight();
803+
}
804+
}
805+
804806
</script>
805807
</body>
806808
</html>

todaycharts/marriage/index.html

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -783,27 +783,7 @@
783783
}// end drawGraphic
784784

785785

786-
//then, onload, check to see if the web browser can handle 'inline svg'
787-
if (Modernizr)
788-
{
789-
790-
// open and load configuration file.
791-
d3.json("config.json", function(error, json)
792-
{
793-
// strore read in json data from config file as as global dvc. variable ...
794-
dvc = json;
795-
readData();
796-
})
797-
798-
} // end if ...
799-
else
800-
{
801-
//use pym to create iframe containing fallback image (which is set as default)
802-
pymChild = new pym.Child();
803-
if (pymChild) {
804-
pymChild.sendHeight();
805-
}
806-
}
786+
807787

808788

809789

@@ -855,6 +835,28 @@
855835

856836
}// end function readData()
857837

838+
//then, onload, check to see if the web browser can handle 'inline svg'
839+
if (Modernizr)
840+
{
841+
842+
// open and load configuration file.
843+
d3.json("config.json", function(error, json)
844+
{
845+
// strore read in json data from config file as as global dvc. variable ...
846+
dvc = json;
847+
readData();
848+
})
849+
850+
} // end if ...
851+
else
852+
{
853+
//use pym to create iframe containing fallback image (which is set as default)
854+
pymChild = new pym.Child();
855+
if (pymChild) {
856+
pymChild.sendHeight();
857+
}
858+
}
859+
858860
</script>
859861
</body>
860862
</html>

todaycharts/ukhpi/index.html

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -678,27 +678,7 @@
678678
}// end drawGraphic
679679

680680

681-
//then, onload, check to see if the web browser can handle 'inline svg'
682-
if (Modernizr)
683-
{
684-
685-
// open and load configuration file.
686-
d3.json("config.json", function(error, json)
687-
{
688-
// strore read in json data from config file as as global dvc. variable ...
689-
dvc = json;
690-
readData();
691-
})
692681

693-
} // end if ...
694-
else
695-
{
696-
//use pym to create iframe containing fallback image (which is set as default)
697-
pymChild = new pym.Child();
698-
if (pymChild) {
699-
pymChild.sendHeight();
700-
}
701-
}
702682

703683

704684

@@ -750,6 +730,28 @@
750730

751731
}// end function readData()
752732

733+
//then, onload, check to see if the web browser can handle 'inline svg'
734+
if (Modernizr)
735+
{
736+
737+
// open and load configuration file.
738+
d3.json("config.json", function(error, json)
739+
{
740+
// strore read in json data from config file as as global dvc. variable ...
741+
dvc = json;
742+
readData();
743+
})
744+
745+
} // end if ...
746+
else
747+
{
748+
//use pym to create iframe containing fallback image (which is set as default)
749+
pymChild = new pym.Child();
750+
if (pymChild) {
751+
pymChild.sendHeight();
752+
}
753+
}
754+
753755
</script>
754756
</body>
755757
</html>

0 commit comments

Comments
 (0)