jquery - trying to get an element's position, but it's always 'undefined' -
i'm trying # use in scrolltop function, 'undefined' have gone wrong? <html><head><meta http-equiv=content-type content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css"> <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script> </head><body> <div data-role="page" id="page5" data-theme="c"> <br><br><br><br> <p><span id="1.11.13">1.11.13</span> lots of text here... </p> <script> $(window).on('pageinit', function() { console.log($('#1.11.13').css('top')); //undefined conso...