MCPcopy Create free account
hub / github.com/HangfireIO/Hangfire.Samples / clickHandler

Function clickHandler

Hangfire.MvcApplication/Scripts/bootstrap.js:519–542  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

517 // =================
518
519 var clickHandler = function (e) {
520 var $this = $(this)
521 var href = $this.attr('href')
522 if (href) {
523 href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
524 }
525
526 var target = $this.attr('data-target') || href
527 var $target = $(document).find(target)
528
529 if (!$target.hasClass('carousel')) return false
530
531 var options = $.extend({}, $target.data(), $this.data())
532 var slideIndex = $this.attr('data-slide-to')
533 if (slideIndex) options.interval = false
534
535 Plugin.call($target, options)
536
537 if (slideIndex) {
538 $target.data('bs.carousel').to(slideIndex)
539 }
540
541 e.preventDefault()
542 }
543
544 $(document)
545 .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)

Callers

nothing calls this directly

Calls 1

$Function · 0.70

Tested by

no test coverage detected