now actually gets ip

This commit is contained in:
Rushil Umaretiya 2020-08-06 21:23:31 -04:00
parent 536ee7270b
commit 401f50c73c
2 changed files with 6 additions and 1 deletions

View File

@ -38,7 +38,7 @@
</nav> </nav>
</header> </header>
<section id="landing-section" class="body-sections"> <section id="landing-section" class="body-sections">
<h1 class="FrontPageHeaderText" id="headerTitleText">82.165.116.211</h1> <h1 class="FrontPageHeaderText ip" id="headerTitleText">82.165.116.211</h1>
<h2 id="TopLeftHeader" class="FrontPageHeaderText">Hi, <br> I'm Rushil</h2> <h2 id="TopLeftHeader" class="FrontPageHeaderText">Hi, <br> I'm Rushil</h2>
<div> <div>
<h2 id="BottomRightHeader" class="FrontPageHeaderText">And this <br> is not my website.</h2> <h2 id="BottomRightHeader" class="FrontPageHeaderText">And this <br> is not my website.</h2>

View File

@ -12,6 +12,11 @@ $(document).ready(function(){
$('.menu').click(function() { $('.menu').click(function() {
$('ul').toggleClass('active'); $('ul').toggleClass('active');
}) })
$.getJSON("https://api.ipify.org?format=json",
function(data) {
$(".ip").html(data.ip);
})
}); });
$(window).load(function() { $(window).load(function() {