Sha256: 08346382cfd81e9757e4c3828e0fe8e31322d7846ab09cfa1b067ff08981bbee
Contents?: true
Size: 564 Bytes
Versions: 42
Compression:
Stored size: 564 Bytes
Contents
$(document).ready(function() { var $tab_with_error = $(".form-control.is-invalid").first().closest('.tab-pane'); if ($tab_with_error.length > 0) { $(".nav.nav-tabs").find("a[href^='#" + $tab_with_error.attr('id') + "']").tab('show'); } else if (document.location.hash.length > 0) { var $tab_from_url = $(".nav.nav-tabs").find("a[href^='" + document.location.hash + "']"); if ($tab_from_url.length > 0) { document.location.hash = ""; // This prevents scrolling to the wrong place in the page $tab_from_url.tab("show"); } } });
Version data entries
42 entries across 42 versions & 1 rubygems