Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In this example, there is some sort of (I hate to be vague...) ajax based content loading system. Take a look at the source:</p> <pre><code>&lt;div data-role="page" id="article.php?siteName=psdtuts&amp;amp;origLink=http%3A%2F%2Fpsd.tutsplus.com%2F%3Fp%3D15026" class="ui-page ui-body-c"&gt; </code></pre> <p>When you first visit, that div doesn't exist. It's created by javascript when content is required, then filled with that content, then translated (animated) into the viewport.</p> <p>Here is a step by step, deduced from a quick look at the page:</p> <ol> <li>Base page is loaded, including css, javascript, nav list</li> <li>Script is waiting for a nav item to be clicked.</li> <li>Upon clicking, an ajax request is made to the content corresponding to the clicked item; determined by <code>href="article.php?siteName=psdtuts&amp;origLink=http://psd.tutsplus.com/?p=15081"</code>. My guess? This ajax request is getting content from the same place as psdtuts.com, likely in a database.</li> <li>While that stuff is loading, javascript shows a loading animation. When loading is complete, it's hidden again.</li> <li>Once the new content-filled div is created, it is given a default position with its left edge placed right outside of the right edge of the screen. Upon the event of being positioned, javascript then determines the view's dimensions and translates the div across the horizontal dimension. At the same time, the nav list is moved the same direction and distance.</li> <li>When back is clicked, the view's dimensions are determined again (In case the window size changed) and the nav and content are translated to the right, hiding the content and showing the navigation again.</li> <li>Repeat</li> </ol> <p>I could be off from how this exact sample is being done, but... Well, this would work.</p> <p>You wouldn't be <em>that</em> crazy to use a framework for something like this, but I can understand wanting to do a custom job. It would certainly be faster for users, but slower for you. Depending on your intent, that would be just fine.</p> <p>edit: If you're only serving this to users with webkit, using a framework is even less necessary... If you're not worrying about cross browser support, there's really not a lot going on here that you couldn't accomplish easily with raw javascript.</p> <p>The only reason I use jQuery for example, most of the time, is to ensure things work alright in most use cases. It just smooths so many things out... Even if 95% of the framework isn't being utilized, it's worth it when you've got a deadline.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload