掲示板

Bootstrap Alert Messages

7年前 に SCOTT GEMMELL によって更新されました。

Bootstrap Alert Messages

New Member 投稿: 10 参加年月日: 14/02/17 最新の投稿
Bootstrap Alert Messages

I am using code I found here on a page in a portlet.
http://liferay.github.io/alloy-bootstrap/javascript.html#alerts
TypeError: a.Alert is not a function

The AUI script that closes the message does not appear to be on my page by default. How do I go about adding bootstrap-alert.js to the page?

<div id="mySuccessAlert" class="alert alert-success">
	    Your Request is Submitted
	    <a href="#" class="close" data-dismiss="alert">×</a>
	</div>
	<script type="text/javascript">
		
			YUI().use(
				'aui-alert',
				function(Y) {
					new Y.Alert(
						{
							closeable: true,
							render: true,
							srcNode: '#mySuccessAlert'
						}
					);
				}
			);
		
	</script>
thumbnail
7年前 に Travis Cory によって更新されました。

RE: Bootstrap Alert Messages

Junior Member 投稿: 73 参加年月日: 13/06/04 最新の投稿
Hey Scott,

Try using YUI().ready(