弹出自动关闭的提示框可以在不同位置,显示不同的效果,有类似iphone效果
![弹出自动关闭的提示框可以在不同位置,显示不同的效果,有类似iphone效果 弹出自动关闭的提示框可以在不同位置,显示不同的效果,有类似iphone效果](http://www.freejs.net/demo/207/demo.jpg)
XML/HTML Code
- <div>
- <input type="button" onclick="$.jGrowl('Default Positioning');" value="Default"/>
- <input type="button" onclick="$('#one').jGrowl('Bottom Right Positioning');" value="Bottom Right"/>
- <input type="button" onclick="$('#two').jGrowl('Bottom Left Positioning');" value="Bottom Left"/>
- </div>
- <div><a href="sideways.html" target="_blank">在同一行显示</a></div>
- <div><a href="jgrowl-pool.html" target="_blank">在指定位置显示</a></div>
- <div><a href="jgrowl.html" target="_blank">在一个页面显示各种不同的效果</a></div>
- <div id="one" class="jGrowl bottom-right"></div>
- <div id="two" class="jGrowl bottom-left"></div>
--------------------------------------------------------
JavaScript Code
- <script type="text/javascript">
- // In case you don't have firebug...
- if(typeof console === "undefined") {
- console = { log: function() { } };
- }
- (function($){
- $(document).ready(function(){
- // This value can be true, false or a function to be used as a callback when the closer is clciked
- $.jGrowl.defaults.closer = function() {
- console.log("Closing everything!", this);
- };
- // A callback for logging notifications.
- $.jGrowl.defaults.log = function(e,m,o) {
- $('#logs').append("<div><strong>#" + $(e).attr('id') + "</strong> <em>" + (new Date()).getTime() + "</em>: " + m + " (" + o.theme + ")</div>")
- }
- $.jGrowl("Hello world!");
- $.jGrowl("This notification will live a little longer.", { life: 1000 });
- $.jGrowl("Sticky notification with a header", { header: 'A Header', sticky: true });
- $.jGrowl("Custom theme, and a whole bunch of callbacks...", {
- theme: 'manilla',
- speed: 'slow',
- beforeOpen: function(e,m,o) {
- console.log("I am going to be opened!", this);
- },
- open: function(e,m,o) {
- console.log("I have been opened!", this);
- },
- beforeClose: function(e,m,o) {
- console.log("I am going to be closed!", this);
- },
- close: function(e,m,o) {
- console.log("I have been closed!", this);
- }
- });
- $.jGrowl("Custom animation test...", {
- theme: 'manilla',
- speed: 'slow',
- animateOpen: {
- height: "show"
- },
- animateClose: {
- height: "hide"
- }
- });
- $.jGrowl("Looks like the iPhone.", {
- sticky: true,
- header: 'iPhone',
- theme: 'iphone'
- });
- $.jGrowl("This message will not open because we have a callback that returns false.", {
- beforeOpen: function() {
- console.log("Going to open a notification, but not really...");
- },
- open: function() {
- return false;
- }
- });
- $.jGrowl("This message will not close because we have a callback that returns false.", {
- beforeClose: function() {
- return false;
- }
- });
- $.jGrowl.defaults.closerTemplate = '<div>hide all notifications</div>';
- $('#test1').jGrowl("Testing a custom container (this one is sticky, and will also be prepended).", {
- closer: false,
- sticky: true,
- glue: 'before',
- speed: 2000,
- animateOpen: {
- height: "show",
- width: "show"
- },
- animateClose: {
- height: "hide",
- width: "show"
- }
- });
- $('#test1').jGrowl("Another custom container test.", {
- glue: 'before',
- speed: 2000,
- animateOpen: {
- height: "show",
- width: "show"
- },
- animateClose: {
- height: "hide",
- width: "show"
- }
- });
- $('#test2').jGrowl("Trying a background image.", {
- theme: 'smoke',
- closer: false
- });
- });
- })(jQuery);
- </script>
XML/HTML Code
- <p><a href="javascript:void(0);" onclick="$.jGrowl('One more message...');">Click here to create a message on demand in the #jGrowl container in the top-right corner of the screen.</a></p>
- <p><a href="javascript:void(0);" onclick="$('#test1').jGrowl('shutdown');">Shutdown jGrowl for the #test1 container in the top-left corner of the screen.</a></p>
- <p><a href="javascript:void(0);" onclick="$('#test1').jGrowl('close');">Close all in #test1.</a></p>
- <div id="logs"><h3>Log:</h3></div>
- <hr />
- <div id="test1" class="top-left"></div>
- <div id="test2" class="bottom-left"></div>
相关推荐
iphone 弹出层 iphone 弹出层 iphone 弹出层 iphone 弹出层 iphone 弹出层
android仿iphone手机弹出框体
iphone 滚动提示框 scrolltip view,可以实现各种滚动效果,由上到下,由左到右等等,可以渐隐渐显,可以滑入滑出,可以推入退出,移入移出等。可以自定义view。
仿iphone提示框。
仿path效果 类似iphone 我也模仿了Path效果,效果更接近iphone
一款使用html5 svg技术制作的线条动态绘制iphone边框动画效果,页面中先是用线条动态绘制出iphone的轮廓,然后再显示iphone图片,效果十分华丽。
jquery UI渐变提示效果类似iphone日历效果.zip
iOS的popover只能在iPad上使用,这个可以实现在iphone上的popover弹出框效果
仿iphone的点击按钮弹出二级菜单功能,例子中两个动画不是同时启动,使用的时候需要改过来。
iphone上使用的弹出框,点击选择触发不同的视图,比较易懂的demo。
iphone X iphone 8 原型框 iphone X iphone 8 原型框
类似iphone密码输入效果,该效果模仿了我们现在的iphone手机密码输入的的,在我们还没有输入密码的效果时,就会显示未输之前是“-”,当我们输入密码之后就会变成“.”这样的效果的。
iphone混合object-C++自动测试框架
NULL 博文链接:https://edison-cool911.iteye.com/blog/1141874
精简版在 iPhone 的弹出窗口中显示 UIViewController/UIView如何使用有 4 种方法可以显示弹出菜单显示内容并指向 FromView // Pop from this Buttonlet fromBtn = UIButton. buttonWithType (UIButtonType. ...
jQuery模拟iphone单选框复选框效果,jQuery,iphone,单选框,复选框,表单按钮.
NULL 博文链接:https://malong26.iteye.com/blog/1562876
3中iPhone很炫的动态效果,有源代码
iPhone 拖动效果 flash