Sale is live! Enjoy 70% Off! Use Credit/Debit Cards in India and PayPal outside of India for better experience!

How to make div clickable

It can be done using jQuery click event and window.location.href function. Click event will be fired when user click on div then redirect function will redirect the page to specified link.

Source Code:

<!DOCTYPE html>
        <title>How to make div clickable - jQuery | MG Technologies</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="jquery-1.js" type="text/javascript"></script>
                    alert("Div is clicked! Now it will redirect to home page");
                    window.location.href = "";
        <h2>Clickable div using jQuery</h2>
        <div class="clickable">I'm a DIV linked with home page. Click me to see that.</div>

Free - Download it right now!


Include all files

Demo Download

Reviews and Comments