|
@@ -233,6 +233,28 @@
|
|
<script>
|
|
<script>
|
|
// Configuration loaded, so safe to make other require calls.
|
|
// Configuration loaded, so safe to make other require calls.
|
|
require(['converse'], function (converse) {
|
|
require(['converse'], function (converse) {
|
|
|
|
+ (function () {
|
|
|
|
+ /* XXX: This function initializes jquery.easing for the https://conversejs.org
|
|
|
|
+ * website. This code is only useful in the context of the converse.js
|
|
|
|
+ * website and converse.js itself is NOT dependent on it.
|
|
|
|
+ */
|
|
|
|
+ $(window).scroll(function() {
|
|
|
|
+ if ($(".navbar").offset().top > 50) {
|
|
|
|
+ $(".navbar-fixed-top").addClass("top-nav-collapse");
|
|
|
|
+ } else {
|
|
|
|
+ $(".navbar-fixed-top").removeClass("top-nav-collapse");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ //jQuery for page scrolling feature - requires jQuery Easing plugin
|
|
|
|
+ $('.page-scroll a').bind('click', function(event) {
|
|
|
|
+ var $anchor = $(this);
|
|
|
|
+ $('html, body').stop().animate({
|
|
|
|
+ scrollTop: $($anchor.attr('href')).offset().top
|
|
|
|
+ }, 700, 'easeInOutExpo');
|
|
|
|
+ event.preventDefault();
|
|
|
|
+ });
|
|
|
|
+ })();
|
|
|
|
+
|
|
converse.initialize({
|
|
converse.initialize({
|
|
bosh_service_url: 'https://bind.conversejs.org', // Please use this connection manager only for testing purposes
|
|
bosh_service_url: 'https://bind.conversejs.org', // Please use this connection manager only for testing purposes
|
|
i18n: locales.en, // Refer to ./locale/locales.js to see which locales are supported
|
|
i18n: locales.en, // Refer to ./locale/locales.js to see which locales are supported
|