If you're looking to add some stylish icons to your website, consider using an api like Font Awesome. You can easily incorporate it with jQuery by using the following cdn link.
$('head').append('<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">');
Next, create a div and apply CSS to display the hamburger icon only on smaller screens using Bootstrap classes. Here's how you can do it:
<div class="mobile_bars hidden-lg hidden-md hidden-sm">
<button id="hide_menu">
<i class="fa fa-bars" aria-hidden="true"></i>
</button>
</div>
You can implement this using jQuery or simply include it in your HTML code.
Don't forget to adjust your site's CSS to accommodate this new element. Here's an example:
<style>
.mobile_bars {
margin-left: 262px;
margin-top: -32px;
}
Just follow @keithjgrant's script to make it functional. And for some extra flair, consider integrating animated.css into your project for dynamic transitions!
For more animation options, check out .
This setup may not be final, but it sets you on the right path. If you're targeting mobile users, this solution works great. For desktop usage, you can customize the icon placement as needed!