开发者

How to get this effect (don't know what it is called?!?!) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 3 years ago.

Improve this question 开发者_开发百科

There is a site called http://www.nomomon.com, and when a user signs in there is a box that pops up saying 'connected to server', and welcome back etc etc...

To see what I mean go to the site and login with the email lazycg@live.co.uk and the password: pass

You will see what I mean, I just don't know how to go about creating this effect, any ideas??


One name for the technique you're thinking of would be "lightbox". There are many existing scripts to achieve such an effect. A quick search for "JavaScript lightbox" will return thousands of results.

Personally, I tend to use jQuery UI Dialog if I'm already using jQuery. Have a look at the modal example in the jQuery UI docs to find something similar to the example in your question.


This is a modal window: http://en.wikipedia.org/wiki/Modal_window

This a live example that you can use: http://jqueryui.com/demos/dialog/#modal-message

With some modification you could get a similar effect. Use a darker background, do some AJAX requests to update the message shown then redirect the user.


That effect is called a lightbox, it's obtainable by simply having an half transparent overlay over the page, and on top of that, a <div> which is animated with jQuery. The text changes, probably according to the AJAX call results, that's about all there is to it.


Their code in http://www.nomomon.com/ui/login.js is obscured, but I'd approach this with a tool like xajax ... http://www.xajax-project.org ... which can easily access call both PHP and javascript/jQuery functions. Doing a MySQL query, updating the DOM with jQuery, doing another MySQL query, updating the DOM again, etc.


The effect in jquery is called a lightbox. The one used on that site looks very similar to FancyBox. I'm willing to bet it is fancy box with a custom skin.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜