Featured post
javascript - YUI "Saved" notification -
i'm trying create short term overlay notification app i'm working on. happen constrained using yui script library. goal make yui-styled notification appear on page following post wherein form saved. use simpledialog, client doesn't want have interact notification, , don't want buttons or controls on whatsoever, featureless, styled box displays message.
the effect i'm trying pull off right produce similar jquery's showglobalmessage function. so, there yui controls capable of doing this? , if not, best way, using self-written js, produce effect?
thanks help.
is yui overlay widget you're looking for?
i pasted sample page demonstrating how works. if that's more or less you're looking for, should able have function that, upon form submission, activates overlay. have lookup api learn more -- http://developer.yahoo.com/yui/3/overlay/
also, yui has custom events (but don't know them): http://developer.yahoo.com/yui/3/event/
<body> <div id="mycontent"> <div class="yui3-widget-hd">overlay header</div> <div class="yui3-widget-bd">overlay body</div> <div class="yui3-widget-ft">overlay footer</div> </div> <style> #mycontent { background-color:blue; color:red; } </style> <div id="parentnode"></div> <style> #parentnode { color:red; background-color:blue; } </style> lorem ipsum dolor sit amet, consectetur adipiscing elit. vestibulum ornare phare etiam porttitor consectetur sagittis. suspendisse libero lorem, porta ut tincidu etiam dapibus urna ut mauris semper varius. vestibulum auctor tincidunt urna, id nam posuere rutrum sem porttitor pretium. suspendisse pulvinar sodales viverra. donec eleifend nisi nec mauris vestibulum placerat sapien molestie. in tempus proin tincidunt feugiat accumsan. fusce vel sagittis tellus. quisque vitae conse nam vestibulum, ipsum suscipit dignissim feugiat, nisl lectus sodales felis, nec quisque venenatis, nulla sit amet sodales semper, turpis nulla viverra lectus, phasellus euismod ligula @ lectus interdum malesuada ante lacinia. nam venena class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos donec ut eros lorem, eget bibendum neque. aliquam semper, tortor sed euismod luc nullam volutpat adipiscing congue. aliquam fringilla diam quis quam pharetra tin etiam tortor @ justo sodales mattis. praesent porttitor enim ac sem ultrices nam condimentum, ante non adipiscing tristique, magna felis semper arcu, eu temp morbi ut enim eget urna ornare elementum ac ligula. vestibulum commodo quam se <script src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script> <script> yui().use('overlay', function(y) { var overlay = new y.overlay({ srcnode: '#mycontent', centered: true }); //overlay.render(); overlay.render('#parentnode'); }); </script> </body>
- Get link
- X
- Other Apps
Comments
Post a Comment