this CODE works fine on a page with just Jquery mobile but with my ARCGIS JAVASCRIPT API AND REQUIRE JS, I don't know where to put this function and how to mix Jquery mobile with require js HELP
<script>
$(document).on("pagecreate", "#index", function(e) {
var activePage = this;
alert("in page create");
$("#myMapLayers").one("panelbeforeopen", function() {
var screen = $.mobile.getScreenHeight(),
header = $(".ui-header", activePage).hasClass("ui-header-fixed") ? $(".ui-header", activePage).outerHeight() - 1 : $(".ui-header", activePage).outerHeight(),
footer = $(".ui-footer", activePage).hasClass("ui-footer-fixed") ? $(".ui-footer", activePage).outerHeight() - 1 : $(".ui-footer", activePage).outerHeight(),
panelheight = screen - header - footer;
$('.ui-panel').css({
'top': header,
'min-height': panelheight
});
});
});
</script>
how do I write this and where when I have requirejs
Sorry, I am a real NEWBY!