🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

bootstrap.native

Package Overview
Dependencies
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bootstrap.native

Native JavaScript for Bootstrap, the sweetest JavaScript library without jQuery.

3.0.15-alpha2
Source
npm
Version published
Weekly downloads
340K
0.18%
Maintainers
1
Weekly downloads
 
Created

What is bootstrap.native?

bootstrap.native is a JavaScript library that provides native JavaScript components for Bootstrap, eliminating the need for jQuery. It aims to offer the same functionality as Bootstrap's JavaScript components but in a more lightweight and efficient manner.

What are bootstrap.native's main functionalities?

Modal

This code demonstrates how to create and control a Bootstrap modal using bootstrap.native. It initializes a modal and sets up an event listener to show the modal when a button is clicked.

document.addEventListener('DOMContentLoaded', function() {
  var myModal = new Modal(document.getElementById('myModal'));
  document.getElementById('openModal').addEventListener('click', function() {
    myModal.show();
  });
});

Tooltip

This code demonstrates how to create a tooltip using bootstrap.native. It initializes a tooltip with a specified title and placement on a target element.

document.addEventListener('DOMContentLoaded', function() {
  var tooltipTrigger = document.getElementById('tooltipTrigger');
  var myTooltip = new Tooltip(tooltipTrigger, {
    title: 'This is a tooltip',
    placement: 'top'
  });
});

Dropdown

This code demonstrates how to create a dropdown menu using bootstrap.native. It initializes a dropdown on a specified element.

document.addEventListener('DOMContentLoaded', function() {
  var dropdownElement = document.getElementById('myDropdown');
  var myDropdown = new Dropdown(dropdownElement);
});

Other packages similar to bootstrap.native

Keywords

bootstrap.native

FAQs

Package last updated on 20 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts