1. jQuery.fn.anchorAnimate = function(settings) {
  2.  
  3. settings = jQuery.extend({
  4. speed : 1100
  5. }, settings);
  6.  
  7. this.each(function(){
  8. var caller = this;
  9. //$(caller).click(function (event) {
  10. //event.preventDefault();
  11. var locationHref = window.location.href;
  12. var elementClick = $(caller).attr("ancora");
  13.  
  14. var destination = $('#' + elementClick).offset().top;
  15. $("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed//, function() {
  16. //window.location.hash = elementClick;
  17. //alert('OPa');
  18. //}
  19. );
  20. //return false;
  21. //})
  22. })
  23. }
  24.