Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#loadingPage').bind('pageinit', function(event) {
- $('#loadingPage').append("<img id='load-img' src='../img/logo_big.png' style='display:none' />");
- $('#load-img').load(function() {
- $('#load-img').width($(window).width() * 0.8);
- $('#load-img').css('margin-left', ($(window).width() - $('#load-img').width()) / 2);
- $('#load-img').css('margin-top', ($(window).height() - $('#load-img').height()) / 2);
- $('#load-img').show();
- setTimeout(function() {
- $.mobile.changePage("menu.html", {
- transition : "slideup"
- });
- }, 1000)
- })
- });
- $('#menuPage').live('click', function(){
- alert('aa');
- })
- $('#menuPage').live('pagecreate', function(event) {
- alert('bb');
- //resize the menu
- var nbImg = $('img').length - 1;
- $("img:eq(" + nbImg + ")").load(function() {
- if ($('#menu').height() < $(window).height()) {
- var margin = $(window).height() - ($('#menu').height() - $(window).height() * 0.3 );
- margin = margin / 2;
- if (margin > 0) {
- $('#menu .menu_content_first').css('margin-top', margin);
- }
- }
- //settings size
- $('#menu #settings').css('bottom',$('#menu').height()-$(window).height()+'px');
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement