MCPcopy
hub / github.com/kenberkeley/react-demo / clickHandler

Function clickHandler

static/bootstrap/js/bootstrap.js:502–518  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

500 // =================
501
502 var clickHandler = function (e) {
503 var href
504 var $this = $(this)
505 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
506 if (!$target.hasClass('carousel')) return
507 var options = $.extend({}, $target.data(), $this.data())
508 var slideIndex = $this.attr('data-slide-to')
509 if (slideIndex) options.interval = false
510
511 Plugin.call($target, options)
512
513 if (slideIndex) {
514 $target.data('bs.carousel').to(slideIndex)
515 }
516
517 e.preventDefault()
518 }
519
520 $(document)
521 .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)

Callers

nothing calls this directly

Calls 1

$Function · 0.85

Tested by

no test coverage detected