Text goes from centered to left justified once I move to another view and then back again

2 posts, 0 answers
  1. Sasha
    Sasha avatar
    2 posts
    Member since:
    Jul 2010

    Posted 01 May 2012 Link to this post

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <title>My Open Cal</title>
        <!-- Kendo UI Files -->
        <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
        <script src="js/jquery.min.js" type="text/javascript"></script>
        <script src="js/kendo.mobile.min.js" type="text/javascript"></script>
            var twitterDataSource;
            $( //jQuery page load
                function ()
                    var app = new kendo.mobile.Application($(document.body), { layout: "layout", icon: "/images/xboxavatar.png" });
                function setupListView()
                    twitterDataSource = new kendo.data.DataSource(
                                            url: "http://search.twitter.com/search.json",
                                            contentType: "application/json; charset=utf-8",
                                            type: "GET",
                                            dataType: "jsonp",
                                                q: "#tampa"
                                data: "results"
                        pullToRefresh: true,
                        appendOnRefresh: true,
                        dataSource: twitterDataSource,
                        template: "<p>${text}</p>"

        <!-- Layout for all views in the application, as specified when the app is created -->
        <div data-role="layout" data-id="layout">
          <div data-role="header" >
              <div data-role="navbar">
                <span data-role="view-title">My Open Cal</span>
          <div data-role="footer">
              <div data-role="tabstrip">
                <a href="#index" data-icon="organize">My Calendar</a>
                <a href="#search" data-icon="search">Search</a>
                <a href="settings.htm" data-icon="settings">Settings</a>
        <div data-role="view" id="index" data-title = "My Calendar" data-init="setupListView"
            <div style="text-align:center">
                <ul id="ulMyCal" data-style="inset">
        <div data-role="view" id = "search" data-title = "Search">
  2. Petyo
    Petyo avatar
    2444 posts

    Posted 03 May 2012 Link to this post


    Your markup is invalid, this is the reason for that behavior. See this jsFiddle for the fixed version. 

    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top