Smooth page transitions in HTML5 with CSS3 without using jquery - html

I am designing a web page for mobile devices. I know jquery is awesome but I dont want to use it. I want to achieve smooth page transitions like this http://jquerymobile.com/demos/1.0a4.1/ but without using jquery. How can I achieve that? There are web service being called between page transtitions, hence there will be delay. I want it to be as smooth as possible.

Face it: You're going to have to use JavaScript, and it'll be very tedious without using some framework or other. To get smooth page transitions, you have two options:
1) Run the site as a single page. That is what is used in the site you link to. The whole thing has no page transitions; it's all one page with some click events used to animate the content and load it dynamically with AJAH.
2) Run a multi page site, but using local storage. You would have a small number of pages, and cache the resources needed for them. The JavaScript would run instantly when the page was loaded, and draw a nice load screen while the ordinary content was loaded and displayed by AJAX.
Personally, I wouldn't be too concerned about page transitions; it's just how websites work. Don't be put off by jQuery either, because by the time you've written all this JavaScript you will be wanting it. Even for mobile sites, the size of the library is just about acceptably small (you can use a CDN-cached copy).

Related

Is there any way to navigate inside frames on a webpage using Nightmare JS?

I am having trouble using Nightmare js to access elements within a specific frame on a webpage that gets its elements from a different html file. These are frames, not iframes, so plugins such as iframe-manager do not work.
I also cannot go to the src page of the frame as what I am attempting to do opens another window when clicked on the frames html.
On the original webpage clicking the button on the frame reveals information within another frame on the webpage. It would be easier (and potentially possible, unlike other options) to navigate within frames on the original webpage.
Any guidance would be appreciated thanks.
Decided to cut my losses and switch to puppeteerJS
Unlike Nightmare, it supports switching to normal frames via their contentFrame() method and $
No shade on Nightmare though, its a good API, just lost support for this frankly archaic web design choice

Creating iOS-style "Zoom element to next page" transitions with CSS and JS

I am building web-apps using Ratchet, replicating the look of native APPs.
Ratchet is doing a great job at replicating the look of iOS, but there is a feature which I really miss from iOS which is the ability to "move" an element to the next page by moving and zooming it.
Example: I have a list of articles. Upon clicking the thumbnail of the article, the thumbnail image gets bigger as the articles open, in a seamless transition.
The following gif. from Facebook "paper" illustrates well the effect I want to achieve:
http://d24njcbunk2gp2.cloudfront.net/assets/2014/02/Facebook-Paper-008.gif
My questions would be:
- Is this type of transition possible using only web-technologies?
- Is it possible, in general, to have one element moving in a continuous way from one page to another without any flickering effect?
- Would such effect be possible only with single-page applications? (say a single-page website built with angularJS)
- Would any framework / tool (PhoneGap?) be useful in achieving this result
Thanks so much.
Thomas

Can a website be made in cocos2d-html?

I have been working with cocos2d-iPhone, cocos2d-x, and cocos2d-html5 for quite some time. I wanted to ask if it is okay to build a website with cocos2d-html5. I want to do it because I want the website look interactive, animated, and scroll around like a game. We can do this with javascript, but is it possible to write it in cocos3d-html5? What are the drawbacks of doing this? And is there any existing website that is built on cocos2d?
Thank you for the help.
As i figured out, you cannot make a cocos2d-html based website as it is for making web apps for web sites. Although a web app can cover up the whole screen but there are a large number of issues assigned to creating such a situation. The internet users are used to using the refresh and back buttons on the web browser as well as opening in the new tab, nothing of these options would work in a cocos2d-html based web app as the navigation would be all done within the application and in no way can the button in the browser respond in the appropriate manner.

html5 sliding independent page transition for desktop website

I am trying to program a website with multiple independent pages and I would like to use the slide transition effect between pages as it can be done with the jquery mobile Framework but WITHOUT using this one. My goal is to make a desktop web site and not a mobile app.
The fluidity and the speed of execution are my objectives. I saw that you can use the jQuery Easing plugin (version 1.3) but I'm not able to place this code for having a fluid transition effects between independent pages.
I intended to do this transition page effect with the TerrenceRyan.com solution but it doesn't work correctly.
I don't want to do a navigation with jquery anchor or hidden divs placed in a long one page, but many independent pages that arrive at their click sliding.
To give you an example of what I am trying to achieve, here are some links:
http://www.craigandkarl.com/
http://www.ultranoir.com/
If performance is key and you don't want to use jQuery maybe have a look at the new greensock javascript library
They have a test page which shows that it performs really well against other similar libraries:
speed test page
I have been using their AS2, AS3 engine for flash for many years now and if the JS version is nearly as good, then I'm sure it will be of use to you.

prevention of scroll reset when linking?

First time overflowing the stack.
I'm making a website with several html pages that are identical except for the fact that they contain different images that are more or less identical in size - and thats how they are named, by the jpg that they feature.
The pictures look great with the website, but I have a 300 pixel header that pushes them downward > forcing you to scroll down to see the full image. This is built into the shared CSS for all these gallery pages.
I have simple text links below the images that are hard coded to point to the next image in the gallery. (I have a list of the 20 images im displaying). When someone clicks the image, it goes to that page and resets the scroll to the top, which makes the header push the image area down.
Can anyone tell me how to prevent the scroll reset behavior of the new link?
Without using something like jQuery, you could link the pages such that you have an anchor tag like <a name="gallery"></a> above the images on each page and when giving the link to the various pages, append a #gallery to the url such as Next Image. This is duplicated on each page however, and will not produce a robust webpage. You'll want to change things in the future and this will cause problems and further work, so I would consider a dynamic alternative.
Note this won't look as seamless as with jQuery and using AJAX to load in the images when needed. Or better yet, as most JS galleries work, load the images into the page invisible at first and then with JS have them show up on the link click. The benefit of this would be that you could generate the links in JS using the provided images. If the images are large enough that they may cause considerable lag on page load, consider making placeholder images of some sort. In any case, take a look at lightbox 2.
Also, I didn't get the feeling you were using any server side scripting to create this gallery. If the js solution doesn't suit you or you find the added benefit of generating part of the website automatically based on the content need at the time, take a look at using something like PHP, Python, Ruby, etc. If it's just a simple website you're after, a great solution might be Wordpress.
You could have one page and just replace the images?
http://www.quirksmode.org/dom/fir.html
Now of course you change the function to work on a "previous/next" button system, assuming you have a photo gallery of some sort.
Please post more details.
You want your link to look something like this:
<a href="http://www.w3schools.com/html_links.htm#tips">
Visit the Useful Tips Section</a>
and you want to give your image an id="tips" in this case.
Check out this fiddle to see an example. The only difference is that your href will have the rest of the url in there like the code posted above.
http://jsfiddle.net/QgzsL/