Changing icons in navbar on scroll - html

In my navbar I have two logos and a hamburger icon (for displaying the menu). When the user scrolls down, the navbar should change the background color, logos and hamburger should change color (from white to dark). I have managed to achieve that. But when you open and then close the menu after it has been scrolled, the hamburger icon disappears. I have tried many things (including adding classes to the hamburger button on scroll), but nothing worked. I have no idea, how to target "closing" button when the navbar is in scrolled state, so the "dark" version of hamburger button shows up.
$(function(){
function e(){$(window).scrollTop()>0?(
$("nav.nav").addClass("scrolled"),
$(".content-nav").fadeIn(200)):(
$("nav.nav").removeClass("scrolled"),
$(".content-nav").fadeOut(200))
};
});
$(document).ready(function() {
$(".cross").hide();
$(".menu").hide();
$(".hamburger").click(function() {
$(".menu").slideToggle( "slow", function() {
$(".hamburger").hide();
$(".cross").show();
});
});
$(".cross").click(function() {
$(".menu").slideToggle( "slow", function() {
$(".cross").hide();
$(".hamburger-white").show();
});
});
$( ".menu li" ).click(function() {
$( ".menu" ).toggle();
$(".cross").hide();
$(".hamburger").show();
});
});
.landing-page-nav-container {
background-color: #29428A;
}
.scrolled .landing-page-nav-container {
background-color: #FFFFFF;
}
.logo-dark, .hamburger-dark {
display: none;
}
.scrolled .logo-dark, .scrolled .hamburger-dark {
display: initial;
}
.scrolled .logo-white, .scrolled .hamburger-white {
display: none;
}
<nav class="nav navbar-fixed-top collapsed">
<div class="landing-page-nav-container">
<a href="<?php the_field('link_logo')?>">
<img class="img-responsive img-nav img-logo-centrum logo-white" src="https://placekitten.com/50/50">
<img class="img-responsive img-nav img-logo-centrum logo-dark" src="https://placekitten.com/49/50">
</a>
<img class="img-responsive img-nav img-logo-forum logo-white" src="https://placekitten.com/49/49">
<img class="img-responsive img-nav img-logo-forum logo-dark" src="https://placekitten.com/50/49">
<button class="hamburger hamburger-white">
<img class="img-responsive img-nav hamburger-icon" src="https://via.placeholder.com/50x50/000000/FFFFFF">
</button>
<button class="hamburger hamburger-dark">
<img class="img-responsive img-nav hamburger-icon" src="https://via.placeholder.com/50x50">
</button>
<button class="cross" style="display: none">
<img class="img-responsive img-nav hamburger-icon cross-icon" src="https://via.placeholder.com/50x50?text=cross">
</button>
<div class="menu" style="display: none">
<ul>
<li><?php the_field('about_napis')?></li>
<li><?php the_field('program_napis')?></li>
<li><?php the_field('registration_napis')?></li>
<li><?php the_field('report_napis')?></li>
<li><?php the_field('lttalks_napis')?></li>
<li><?php the_field('events_napis')?></li>
</ul>
</div>
</div>
</nav>
<script type = "text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

The problem was in applying .show() on .hamburger, after clicking on .cross (which was messing in corect executing CSS).
Working jQuery code:
$(function(){
function e(){$(window).scrollTop()>0?(
$("nav.nav").addClass("scrolled"),
$(".content-nav").fadeIn(200)):(
$("nav.nav").removeClass("scrolled"),
$(".content-nav").fadeOut(200))
};
});
$(document).ready(function() {
$(".cross").hide();
$(".menu").hide();
$(".hamburger").click(function() {
$(".menu").slideToggle( "slow", function() {
$(".hamburger").hide();
$(".cross").show();
});
});
$(".cross").click(function() {
$(".menu").slideToggle( "slow", function() {
$(".cross").hide();
$(".hamburger-dark").removeAttr("style");
$(".hamburger-white").removeAttr("style");
});
});
$( ".menu li" ).click(function() {
$( ".menu" ).toggle();
$(".cross").hide();
$(".hamburger-dark").removeAttr("style");
$(".hamburger-white").removeAttr("style");
});
});

Related

How to change d-none class to d-block in jquery on hover?

I would show and hide a button on edit when hovering a div. Like WordPress.
How to display a div inside a div if hovered? I'm trying to do this but there's something wrong, nothing appears.
<div class="row d-flex align-items-center" id="company">
<div class="col-lg-6 mb-4">
<div class="p-5">
<h1>Company</h1>
<p class="text-justify">Description</p>
Start
</div>
</div>
<div class="col-lg-6 mb-4">
<img src="/images/layer.png" alt="Company" class="img-fluid lazy">
</div>
<div class="p-5">
<div id="menu">
<div class="btn-group">
<button type="button" class="btn btn-warning">وEdit</button>
</div>
</div>
</div>
</div
<script>
$("#company").hover(function(){
$("#menu").css("d-none", "d-block");
});
</script>
wordpress
You don't need Javascript for this. You can do it all in CSS. The first rule below defaults to hiding the menu. The second rule overrides the first rule to show the menu when you hover over the #company div.
#menu {
display: none; /* Default */
}
#company:hover #menu {
display: block;
}
If you want to do it with Javascript/jQuery, you must specify separate actions for the mouseenter and mouseleave events, to ensure the menu shows/hides accordingly:
$("#company").hover(
function() {
$("#menu").css("display", "block");
},
function() {
$("#menu").css("display", "none");
},
);
If you want to use purely Bootstrap classes rather than manipulating the CSS style rules directly:
$("#company").hover(
function() {
$("#menu").addClass('d-block').removeClass('d-none');
},
function() {
$("#menu").addClass('d-none').removeClass('d-block');
},
);
Hi your code is almost correct.In your Jquery part you have to use addClass() instead of css() because you are trying to change the class name of the element.Just try this one.Hope this works
<script>
$("#company").hover(function () {
$("#menu").addClass("d-none");
});
</script>
By default the css can be added to the "menu" id
#menu {
display: none;
}
using js:
$("#company").hover(function () {
$("#menu").css("display", "block");
});

Show tooltip on image icon click

I have many image icon on my page which have Tooltip on it and show different text in tooltip. I want to show each tooltips when user click on its image icon not on hover. and also when user click on any other place or area of page tooltip also hide or disappear.
<img style="width:26px; height: 23px;" class="customTooltip" data-toggle="tooltip" data-html="true" title="" src="/images/alert.png" data-original-title="Number Typ and Service Type:">
You can do it using bootstrap
<b-button id="tooltip-target-1">
Click Me
</b-button>
<b-tooltip target="tooltip-target-1" triggers="click">
I am tooltip <b>component</b> content!
</b-tooltip>
No need to reinvent the wheel. You can use third party library like TippyJs:
tippy(".item", {
trigger: 'click',
content: `item info`,
allowHTML: true,
animation: 'fade',
onShow(instance) {
let element = instance.reference;
instance.setContent(element.getAttribute('data-info'));
//console.log(instance);
},
});
img {
margin: 2rem
}
<script src="https://unpkg.com/#popperjs/core#2"></script>
<script src="https://unpkg.com/tippy.js#6"></script>
<img class='item' src="https://picsum.photos/id/4/150/100" data-info="item info 1">
<img class='item' src="https://picsum.photos/id/2/150/100" data-info="item info 2">
My JQuery solution without any other js libs for custom tooltip:
<script>
$(document).ready(function() {
var noHideTooltip = false;
$(document).click(function(e) {
if (!noHideTooltip) {
$('.tooltip-box-show').removeClass('tooltip-box-show');
}
});
$(document).on('click', '.tooltip-box', function(e) {
$('.tooltip-box-show').removeClass('tooltip-box-show');
$(this).addClass('tooltip-box-show');
noHideTooltip = true;
setTimeout(function() { noHideTooltip = false; }, 0);
});
});
</script>
.tooltip-text {display:none; background:#ccc;}
.tooltip-box-show ~ .tooltip-text {display:block;}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/OOjs_UI_icon_alert_destructive.svg/120px-OOjs_UI_icon_alert_destructive.svg.png" class="tooltip-box"><span class="tooltip-text">Text here..</span
Just add your css tooltip style

Switching fas fa icon through javascript - Dark / Light mode

Don't know where I am going wrong, but the icon just doesn't change.
$( ".inner-switch" ).on("click", function() {
if( $( "body" ).hasClass( "dark" )) {
$( "nav" ).removeClass( "dark-force" );
$( "body" ).removeClass( "dark" );
$(this).find("i").toggleClass("fas fa-moon");
} else {
$( "body" ).addClass( "dark" );
$( "nav" ).addClass( "dark-force" );
$(this).find("i").toggleClass("fas fa-sun");
}
});
.dark {
background-color: #222;
}
.dark-force * {
background-color: #222;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" />
<nav class="navbar">
<div class="hero-body">
<div class="container">
<div class="navbar-brand">
<a href="/">
<img src="{% static 'portfolio/Logo.png' %}" width=60>
</a>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<a class="button is-primary is-rounded is-outlined">
<strong>Blog</strong>
</a>
</div>
</div>
<div class="navbar-item">
<div class="buttons">
<a class="button is-primary is-rounded">
<strong>Say Hello!</strong>
</a>
</div>
</div>
<div class="navbar-item">
<div class="buttons">
<a class="button is-primary is-rounded inner-switch">
<i class="fas fa-moon"></i>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</nav>
It does switch to dark mode, but the icon refuses to change from the moon(fas fa-moon). I'm new to javascript but fairly familiar with HTML and CSS. Any help is appreciated. Have a great and safe day! Thanks for reading!
You are nearly there and your code looks good but you need to use addClass and removeClass to switch fas fa icon from sun to moon and vice versa.
$(this).find("i").removeClass("fa-sun").addClass('fa-moon');
When you use toggleClass the existing is still there and new icon is not working as it suppose to.
Live Working Demo:
$(".inner-switch").on("click", function() {
if ($("body").hasClass("dark")) {
$("nav").removeClass("dark-force");
$("body").removeClass("dark");
$(this).find("i").removeClass("fa-sun").addClass('fa-moon');
} else {
$("body").addClass("dark");
$("nav").addClass("dark-force");
$(this).find("i").removeClass("fa-moon").addClass('fa-sun');
}
});
.dark {
background-color: #222;
}
.dark-force * {
background-color: #222;
}
.fa-sun {
color: white;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<div class="navbar-item">
<div class="buttons">
<a class="button is-primary is-rounded inner-switch is-outlined">
<i class="fas fa-moon"></i>
</a>
</div>
</div>
The problem is that you only toggle the sun and moon class every second time.
You need to toggle them both every time!
$(this).find("i").toggleClass("fa-moon").toggleClass("fa-sun");
FYI you don't need to toggle the fas class because you always need it. Also, you don't need to duplicate the code by putting this inside the if/else - as you need to toggle them both every time you click, you can just include this line once directly in the function.
Working example:
$(".inner-switch").on("click", function() {
// toggle moon and sun every time
$(this).find("i").toggleClass("fa-moon").toggleClass("fa-sun");
if ($("body").hasClass("dark")) {
$("nav").removeClass("dark-force");
$("body").removeClass("dark");
} else {
$("body").addClass("dark");
$("nav").addClass("dark-force");
}
});
.dark {
background-color: #222;
}
.dark-force * {
background-color: #222;
}
.button {
font-size: 3em;
color: #f00
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" />
<div class="navbar-item">
<div class="buttons">
<a class="button is-primary is-rounded inner-switch is-outlined">
<i class="fas fa-moon"></i>
</a>
</div>
</div>
You also need to toggle the font color when you toggle the background color.
$("#lightswitch i").click(function() {
var isDark = $("body").is(".dark");
$("body").toggleClass("dark", !isDark);
$(this).toggleClass("fa-moon", isDark).toggleClass("fa-sun", !isDark);
});
body.dark {
background-color: #222;
color: white;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" />
<body>
<div class="navbar-item">
<div class="buttons">
<a id="lightswitch" class="button is-primary is-rounded inner-switch is-outlined">
<i class="fas fa-moon"></i>
</a>
</div>
</div>
</body>

jquery ReplaceWith not working with 2 buttons

I have created 2 buttons, each button will replace content based on partial views, I could load the partial view on the page when I click the button, but this works only once, for instance I clicked button-1 and loaded data, now if I click on button 2 its not working, I needed to go back to main page to click again on button-2
<h3>
<a class="btn btn-warning" id="button1"> Partial View 1</a>
</h3>
<br/>
<h4>
<a class="btn btn-warning" id="buttton2"> Partial view 2</a>
</h4>
<br/> <br/>
<div id="testsim">
</div>
<script type="text/javascript">
$(function () {
$('#button1').click(function () {
$.get('#Url.Action("partialview1", "Home")', function (data1) {
if (data1) {
$('#testsim').replaceWith(data);
}
});
});
$('#button2').click(function () {
$.get('#Url.Action("partialview2", "Home")', function (data2) {
if (data2) {
$('#testsim').replaceWith(data2);
}
});
});
});
</script>
I'm trying to achieve button clicks to toggle between two buttons, everytime button click should replace the content in div tag. Any help would be appreciated.
I think the problem is because of replaceWith() which replaces the element itself i.e. outerHTML-
$(function() {
let $html, current;
$('#button1').click(function() {
/* $.get('#Url.Action("partialview1", "Home")', function(data1) {
if (data1) {
$('#testsim').replaceWith(data);
}
});*/
current = `button 1 was <em>clicked</em>`;
$html = `<div><strong>${current}</strong></div>`;
$('#testsim').replaceWith($html);
});
$('#button2').click(function() {
/*$.get('#Url.Action("partialview2", "Home")', function(data2) {
if (data2) {
$('#testsim').replaceWith(data2);
}
});*/
current = `button 2 was <strong>clicked</strong>`;
$html = `<div><em>${current}</em></div>`;
$('#testsim').replaceWith($html);
});
});
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<h3>
<a class="btn btn-warning" id="button1"> Partial View 1</a>
</h3>
<br/>
<h4>
<a class="btn btn-warning" id="button2"> Partial view 2</a>
</h4>
<br/> <br/>
<div id="testsim" style="background: aquamarine; height: 200px">
</div>
As you can see that the styling of the element disappears after replacing. If you want to perform this operation then you should use html() which replaces only innerHTML-
$(function() {
let $html, current;
$('#button1').click(function() {
/* $.get('#Url.Action("partialview1", "Home")', function(data1) {
if (data1) {
$('#testsim').replaceWith(data);
}
});*/
current = `button 1 was <em>clicked</em>`;
$html = `<div><strong>${current}</strong></div>`;
$('#testsim').html($html);
});
$('#button2').click(function() {
/*$.get('#Url.Action("partialview2", "Home")', function(data2) {
if (data2) {
$('#testsim').replaceWith(data2);
}
});*/
current = `button 2 was <strong>clicked</strong>`;
$html = `<div><em>${current}</em></div>`;
$('#testsim').html($html);
});
});
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<h3>
<a class="btn btn-warning" id="button1"> Partial View 1</a>
</h3>
<br/>
<h4>
<a class="btn btn-warning" id="button2"> Partial view 2</a>
</h4>
<br/> <br/>
<div id="testsim" style="background: aquamarine; height: 200px">
</div>
Hope this helps you.

Links are not clickable?

As I'm designing my node.js application, I'm having trouble figuring out why my anchor links are not working/not clickable. The code itself was working fine before I designed the app. Is there a CSS property I need to configure to fix this? This is for the .player ul li links.
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Bree+Serif' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/style.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'>
<script src="http://connect.soundcloud.com/sdk.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.js"></script>
<script src="https://cdn.socket.io/socket.io-1.2.0.js"></script>
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> -->
<meta charset="UTF-8">
<title>Open Mic Chatroom</title>
</head>
<header>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<!-- <a class="navbar-brand" href="#">
<img alt="Brand" src="...">
</a> -->
<h1>OpenMic</h1>
</div>
</div>
</nav>
</header>
<body>
<div class="container">
<div class="row">
<div class="musicians col-sm-3 col-md-3">
<!-- <div class="musicians col-sm-6 col-md-4"> -->
<!-- <div class="col-sm-6 col-md-4"> -->
<!-- <div class="thumbnail musicians-box"> -->
<!-- <img src="..." alt="..."> -->
<div class="caption">
<h2>Musicians Online</h2>
<p>
<div id="chatters">
</div>
</p>
<!-- <p>Button Button</p> -->
<!-- </div> -->
</div>
</div>
<div class="chatroom col-sm-8 col-md-8">
<!-- <div class="chatroom col-sm-6 col-md-4">
--><!-- <div class="col-sm-6 col-md-4">-->
<!-- <div class="thumbnail chatroom-box"> -->
<!-- <img src="..." alt="..."> -->
<div class="caption">
<h2>Messages</h2>
<div id="messagesContainer"></div>
<!-- </div> -->
</div>
<form action="" id="chat_form">
<input id="info" autocomplete="off" />
<input type="submit" value="Submit">
</form>
</div>
</div>
</div>
<!-- <h3>Messages</h3>
<div id="messagesContainer"></div>
<form action="" id="chat_form">
<input id="info" autocomplete="off" />
<input type="submit" value="Submit">
</form> -->
<!-- SoundCloud Recording Feature -->
<div class="row player">
<div class="soundcloud-player">
<ul>
<div id="player">
<!-- <button type="button" id="startRecording" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-record" aria-hidden="true"></span>
</button> -->
<li id="startRecording">Start Recording</li>
</div>
<!-- <button type="button" id="stopRecording" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-stop" aria-hidden="true"></span>
</button> -->
<li id="stopRecording">Stop Recording</li>
<!-- <button type="button" id="playBack" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-play" aria-hidden="true"></span>
</button> -->
<li id="playBack">Play Recorded Sound</li>
<!-- <button type="button" id="upload" class="btn btn-default btn-lg">
<span class="glyphicon glyphicon-open" aria-hidden="true"></span>
</button> -->
<li id="upload">Upload</li>
</ul>
<p class="status"></p>
<div class="audioplayer">
</div>
</div>
</div>
<!-- <script src="/socket.io/socket.io.js"></script> -->
</div>
<script>
$(document).ready(function() {
var trackUrl;
//establish connection
var socket = io.connect('http://localhost:3000');
$('#chat_form').on('submit', function (e) {
e.preventDefault();
var message = $('#info').val();
socket.emit('messages', message);
$('#info').val('');
});
socket.on('messages', function (data) {
console.log("new message received");
$('#messagesContainer').append(data);
$('#messagesContainer').append('<br>');
// insertMessage(data);
});
socket.on('add_chatter', function (name) {
var chatter = $('<li>' + name + '</li>').data('name', name);
$('#chatters').append(chatter);
});
// //Embed SoundCloud player in the chat
// socket.on('track', function (track) {
// console.log("new track", track);
// SC.oEmbed(track, {auto_play: true}, function (oEmbed) {
// console.log('oEmbed response: ' + oEmbed);
// });
// SC.stream(track, function (sound) {
// console.log("streaming", sound);
// sound.play();
// });
// // socket.on('remove chatter', function (name) {
// // $('#chatters li[data-name=]' + name + ']').remove();
// });
//SOUNDCLOUD RECORDING FEATURE
function updateTimer(ms) {
// update the timer text. Used when user is recording
$('.status').text(SC.Helper.millisecondsToHMS(ms));
}
//Connecting with SoundCloud
console.log("calling SoundCloud initialize");
SC.initialize({
client_id: "976d99c7318c9b11fdbb3f9968d79430",
redirect_uri: "http://localhost:3000/auth/soundcloud/callback"
});
SC.connect(function() {
SC.record({
start: function() {
window.setTimeout(function() {
SC.recordStop();
SC.recordUpload({
track: { title: 'This is my sound' }
});
}, 5000);
}
});
//Adds SoundCloud username to chat app
console.log("connected to SoundCloud");
SC.get('/me', function(me) {
console.log("me", me);
socket.emit('join', me.username);
});
// SC.get('/me/tracks', {}, function(tracks) {
// var myTracks = $("<div>");
// var heading = $("<h1>").text("Your tracks");
// var list = $("<ul>");
// tracks.forEach(function (single) {
// var listItem = $("<li>").text(single.permalink);
// listItem.on("click", function () {
// SC.oEmbed(single.permalink_url, {
// auto_play: true
// }, function(oEmbed) {
// console.log("oEmbed", oEmbed);
// $('.status').html(oEmbed.html);
// });
// });
// list.append(listItem);
// });
// $("body").append(myTracks.append(heading, list));
// });
// username = prompt("What is your username?");
// socket.emit('join', username);
// });
//Start recording link
$('#startRecording a').click(function (e) {
$('#startRecording').hide();
$('#stopRecording').show();
e.preventDefault();
SC.record({
progress: function(ms, avgPeak) {
updateTimer(ms);
}
});
});
//Stop Recording link
$('#stopRecording a').click(function (e) {
e.preventDefault();
$('#stopRecording').hide();
$('#playBack').show();
$('upload').show();
SC.recordStop();
});
//Playback recording link
$('#playBack a').click(function (e) {
e.preventDefault();
updateTimer(0);
SC.recordPlay({
progress: function (ms) {
updateTimer(ms);
}
});
});
//Uploaded SoundCloud Track after recorded
$('#upload').click(function (e) {
e.preventDefault();
SC.connect({
connected: function() {
console.log("CONNECTED");
$('.status').html("Uploading...");
SC.recordUpload({
track: {
title: 'My Recording',
sharing: 'public'
}
},
//When uploaded track, provides link user, but not everyone
function (track) {
// console.log("TRACK", track);
setTimeout(function () {
SC.oEmbed(track.permalink_url, {auto_play: true}, function(oEmbed) {
console.log("THIS IS oEMBED", oEmbed);
// console.log(oEmbed.html);
socket.emit('messages', oEmbed.html );
$('.status').html(oEmbed.html);
});
}, 8000);
// $('.status').html("Uploaded: <a href='" + track.permalink_url + "'>" + track.permalink_url + "</a>");
});
}
});
});
});
});
</script>
</body>
</html>
CSS:
body {
background: url('microphone.svg') no-repeat center center fixed;
background-position: 4% 100%;
}
h1, h2, h3 {
font-family: 'Bree Serif', serif;
}
body {
font-family: 'Open Sans', sans-serif;
}
h1 {
color: white;
padding-left: 5%;
padding-bottom: 5%;
letter-spacing: 4px;
}
.navbar-default {
background-color: #000000;
/* background-image: url('SoundWave.jpg');
background-position: center;
opacity: 0.8;*/
}
input, button, select, textarea {
line-height: 3;
}
.chatroom, .musicians {
border-style: solid;
border-radius: 6%;
border-color: black;
margin-left: 20px;
height: 500px;
background-color: #F2F2F2;
opacity: 0.8;
}
.musicians {
height: fixed;
}
input#info {
margin: 47% 1%;
width: 656px;
border-radius: 10%;
}
.visualSoundContainer__teaser {
height: 100px;
}
.row {
padding-top: 2%;
}
.player {
text-align: center;
}
.player ul li {
z-index: 30;
}
Comment the margin property. It is cover the section. you can check it on firebug while selecting the anchor element.
input#info {
/*margin: 47% 1%;*/
width: 656px;
border-radius: 10%;
}
Working link: http://jsfiddle.net/95yz0h63/
add css
a{
cursor:pointer;
}