Intereting Posts

Rss-канал в jquery mobile не загружается правильно

Great Code Gents, здесь r мои коды

index2.php <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>jQM - Gmap Demo - jsFiddle demo</title> <script type='text/javascript' src='http://code.jquery.com/jquery-1.8.3.js'></script> <link rel="stylesheet" type="text/css" href="/css/normalize.css"> <link rel="stylesheet" type="text/css" href="/css/result-light.css"> <script type='text/javascript' src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> <script type='text/javascript' src="http://jquery-ui-map.googlecode.com/svn/trunk/ui/jquery.ui.map.js"></script> <script type='text/javascript' src="http://jquery-ui-map.googlecode.com/svn/trunk/ui/jquery.ui.map.services.js"></script> <script type='text/javascript' src="http://jquery-ui-map.googlecode.com/svn/trunk/ui/jquery.ui.map.extensions.js"></script> <style type='text/css'> #map-canvas { padding: 0; position : absolute !important; top : 40px !important; right : 0; bottom : 40px !important; left : 0 !important; } </style> <title>jQM Complex Demo</title> <meta name="viewport" content="initial-scale=1, maximum-scale=1"/> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script> <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> </head> <body> <div data-role="page" id="index2" data-url="index2.php"> <div data-role="panel" id="mypanel"> <!-- This is the problematic panel--> </div><!-- /panel --> <div data-role="header"> <a href="#mypanel" data-role="button" data-icon="bars" data-iconpos="notext">Choose Station</a> <h1>The Header</h1> <a href="index2.php" data-ajax="false" data-role="button" data-icon="refresh" data-iconpos="notext">Refresh</a> </div><!-- /header --> <div data-role="content" id="map-canvas"> <p>Welcome </p> <ul data-role="listview" data-inset="true"> <li><a href="index3.php">News</a></li> <li><a href="index4.php">Maps & Directions</a></li> <li><a href="#page4">Contact Us</a></li> </ul> </div><!-- /content --> <div data-role="footer" data-id="myfooter" class="ui-bar" data-position="fixed"> <h4>© 2013</h4> </div><!-- /footer --> </div><!-- /page --> </body> </html> 

index3.php

  <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>forked: RSS Reader with jQuery Mobile - js do it</title> <meta name="Description" content="" /> <meta name="Keywords" content="" /> <link rel="stylesheet" type="text/css" media="screen,print" href="style.css" /> </head> <body> <!-- generated by: jsdo.it - http://jsdo.it/dalettero/aUDB --> <!-- Copyright dalettero - http://jsdo.it/dalettero --> <!-- Licensed under MIT License - http://www.opensource.org/licenses/mit-license.php --> <link href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" type="text/css" rel="stylesheet" /> <script src="http://code.jquery.com/jquery-1.4.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script> <script type="text/javascript" src="index.js"></script> </body> </html> 

Файл index.js

  // added search filter, pubdate // forked from sumukh1's "forked: RSS Reader with jQuery Mobile" http://jsdo.it/sumukh1/4Ton // forked from rotsuya's "RSS Reader with jQuery Mobile" http://jsdo.it/rotsuya/411c /* configuration */ var maxLength = 50; /* writing HTML */ document.write( '<div data-role="page" id="list">' + ' <div data-role="header" data-position="fixed">' + ' <h1><span id="widgetTitle">...</span> ' + ' <span style="font-size: x-small">(HTML5)</span></h1>' + ' </div>' + ' <div data-role="content">' + ' <ul data-role="listview" data-filter="true" id="articleList">' ); for(var i=1; i<=maxLength; i++){ document.write( '<li id="list' + i + '"><a href="#article' + i + '" id="link' + i + '">&nbsp;</a></li>' ); } document.write( ' </ul>' + ' </div>' + '</div>' ); for(i=1; i<=maxLength; i++){ document.write( '<div data-role="page" id="article' + i + '">' + ' <div data-role="header" data-position="inline">' + ' <a href="#list" data-role="button" data-icon="grid" data-back="true">Back</a>' + ' <h1 id="articleHeader' + i + '">&nbsp;</h1>' + ' <a href="#" id="openButton' + i + '" data-role="button" data-icon="plus"' + ' class="ui-btn-right" rel="external">Full Article</a>' + ' </div>' + ' <div data-role="content">' + ' <div id="articleContent' + i + '" class="articleContent">' + ' <p id="articleDate' + i + '" class="articleDate"></p></div>' + ' <div data-role="controlgroup" data-type="horizontal">' + ' <a href="#article' + String(i-1) + '" data-role="button" data-icon="arrow-l"' + ' data-inline="true" class="prevButton">Prev</a>' + ' <a href="#article' + String(i+1) + '" data-role="button" data-icon="arrow-r"' + ' data-inline="true" class="nextButton" data-iconpos="right">Next</a>' + ' </div>' + ' </div>' + '</div>' ); } /* JSONP */ $(function(){ getOnlineFeed('http://feeds.bbci.co.uk/news/education/rss.xml'); /* getOnlineFeed('http://www.engadget.com/rss.xml'); getOnlineFeed('http://feeds.mashable.com/Mashable?format=xml'); getOnlineFeed('http://news.google.com/news?hl=ja&ned=us&ie=UTF-8&oe=UTF-8&output=atom&topic=h'); getOnlineFeed('http://www.appbank.net/feed'); getOnlineFeed('http://japanese.engadget.com/rss.xml'); getOnlineFeed('http://www.bebit.co.jp/index.xml'); getOnlineFeed('http://www.ntt.com/rss/release.rdf?link_id=ostop_service_rss'); getOnlineFeed('http://feeds.feedburner.com/gapsis'); getOnlineFeed('http://octoba.net/feed'); getOfflineFeed('google_news_jsonp.js'); */ }); /* functions */ var listEntries = function(json) { if (!json.responseData.feed.entries) return false; $('#widgetTitle').text(json.responseData.feed.title); var articleLength =json.responseData.feed.entries.length; articleLength = (articleLength > maxLength) ? maxLength : articleLength; for (var i = 1; i <= articleLength ; i++) { var entry = json.responseData.feed.entries[i-1]; $('#link' + i).text(entry.title); $('#articleDate' + i).text(entry.pubdate); $('#articleHeader' + i).text(entry.title); $('#openButton' + i).attr('href', entry.link); $('#articleContent' + i).append(entry.content); } $('#article1 .prevButton').remove(); $('#article' + articleLength + ' .nextButton').remove(); if (articleLength < maxLength) { for (i = articleLength + 1; i <= maxLength; i++) { $('#list' + i).remove(); $('#article' + i).remove(); } } }; var getOnlineFeed = function(url) { var script = document.createElement('script'); script.setAttribute('src', 'http://ajax.googleapis.com/ajax/services/feed/load?callback=listEntries&hl=ja&output=json-in-script&q=' + encodeURIComponent(url) + '&v=1.0&num=' + maxLength); script.setAttribute('type', 'text/javascript'); document.documentElement.firstChild.appendChild(script); }; var getOfflineFeed = function(url) { var script = document.createElement('script'); script.setAttribute('src', url); script.setAttribute('type', 'text/javascript'); document.documentElement.firstChild.appendChild(script); }; 

отбраковал эти коды из сети. Теперь то, что я пытаюсь архивировать, отображает rss-канал в index3.php (с зависимостью index.js) от главной страницы (index2.php). Но, скорее, это проявление некоторой аномалии. Я подозреваю, что несовместимые файлы jquery donno. любые лучшие идеи будут высоко оценены. Благодарю.