Owl Carousel, making custom navigation

You need to enable navigation and edit navigationText: Assuming this is version 1.3.2 $(“#owl-example”).owlCarousel({ navigation: true, navigationText: [“<img src=’myprevimage.png’>”,”<img src=’mynextimage.png’>”] }); Assuming it’s version 2: $(“#owl-example”).owlCarousel({ nav: true, navText: [“<img src=’myprevimage.png’>”,”<img src=’mynextimage.png’>”] });

Read More

Performs a smooth page scroll to an anchor Jquery

$(function() { $(‘a[href*=”#”]:not([href=”#”])’).click(function() { if (location.pathname.replace(/^\//,”) == this.pathname.replace(/^\//,”) && location.hostname == this.hostname) { var target = $(this.hash); target = target.length ? target : $(‘[name=’ + this.hash.slice(1) +’]’); if (target.length) { $(‘html, body’).animate({ scrollTop: target.offset().top }, 1000); return false; } } }); }); source¬†https://css-tricks.com/snippets/jquery/smooth-scrolling/

Read More

AngularJS-Twig conflict with double curly braces

solution 1 You can change the start and end interpolation tags using interpolateProvider service. One convenient place for this is at the module initialization time. angular.module(‘myApp’, []).config(function($interpolateProvider){ $interpolateProvider.startSymbol(‘{[{‘).endSymbol(‘}]}’); }); Solution 2 You can use too the attribute-based directive <p ng-bind=”yourText”></p> is the same as <p>{{yourText}}</p> Solution 3 Verbatim, is very elegant and readable for several […]

Read More