Sorry, sorry...
I found.
It needs to call the require.js
require(['jquery'], function ($) { $('#myModal').modal('show');
});
Thanks,
It is working now.
2014-07-21 9:50 GMT-03:00 Danilo Oliveira <daniloa.oliveira(a)gmail.com>om>:
Hello Devs,
I am trying to configure a custom modal popup in my XWiki 6.1 ( I am using
Flamingo), I am following this site as reference:
http://getbootstrap.com/javascript/
Well, I created mycustom modal (It will show a youtube video):
<div class="modal fade" id="myModal" tabindex="-1"
role="dialog"
aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close"
data-dismiss="modal"><span
aria-hidden="true">×</span><span
class="sr-only">Close</span></button>
<h4 class="modal-title"
id="myModalLabel">Trailer</h4>
</div>
<div class="modal-body">
{{youtube vID="5DO-nDW43Ik?html5=1" /}}
</div>
<div class="modal-footer">
<button type="button" class="btn
btn-primary">Ok</button>
</div>
</div>
</div>
</div>
if I call it from a button, it works:
<button class="btn btn-primary btn-lg" data-toggle="modal"
data-target="#myModal">
Launch demo modal
</button>
However If a call from my JS function, it not works:
$('#myModal').modal('show');
How Can I call it from the XWiki?
Thanks!
Danilo
--
Danilo Amaral de Oliveira
Engenheiro de Computação
celular (32) 9111 - 6867
--
Danilo Amaral de Oliveira
Engenheiro de Computação
celular (32) 9111 - 6867