Commits

Nick Freear committed 83aa1e9

Fixing trackoer_show_embed site Javascript - call within $document.ready

Comments (0)

Files changed (1)

application/assets/site/js/trackoer-site.js

 */
 $.log = function(ob){if(typeof console!=='undefined'){console.log(arguments)}};
 
-/* OER Form - extended.
-*/
 $(document).ready(function(){
+
+	/* OER Form - extended.
+	*/
 	function trackoer_form() {
 		$('#ga-ac').attr('class', $('input[name=sv]:checked').val() == 'ga' ? 'show' : 'hide');
 		$.log('#sv-ga change..');
 		trackoer_form();
 	});
 	trackoer_form();
+
+
+	trackoer_show_embed();
 });
 
 /* Make every test License-tracker code clickable. A click reveals the code-snippet.
 */
-(function trackoer_show_embed(){
+function trackoer_show_embed(){
 	var elem_code = $('#cc-code')
 		, area_id = 'copy-me-js'
 		, dl = document.location
 	if (dl.hash.indexOf(area_id) != -1) {
 		elem_code.click();
 	}
-})();
+}
+