Skip to content

Instantly share code, notes, and snippets.

@jamesfinley
Created August 7, 2012 17:46
Show Gist options
  • Save jamesfinley/3287735 to your computer and use it in GitHub Desktop.
Save jamesfinley/3287735 to your computer and use it in GitHub Desktop.
Fix for YouVersion
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="eng" lang="eng">
<head>
<title>YouVersion</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name = "viewport" content = "user-scalable = no">
<style type="text/css">
body { font-family: 'Helvetica Neue',Helvetica,Verdana,sans-serif; font-size: 17pt; }
.note {
display: inline-block;
}
.note.open {
display: inline;
}
.note .body {
display: none;
}
.note.open .body {
display: block;
}
.note .label {
vertical-align: baseline;
cursor: pointer;
background-image:url([email protected]);
background-size: 16px 16px;
background-repeat: no-repeat;
height: 16px;
width: 16px;
display: inline-block;
text-indent: -9999px;
padding: 0px .5em 0px .35em;
background: blue;
}
.note .body {
display: none;
color: #666;
box-shadow:inset 0 0 10px rgba(0,0,0,.3);
padding: 20px;
border-radius: 6px;
background: rgba(0,0,0,.1);
margin-bottom: 1em;
}
</style></head><body>
<p>Here's the problem: Click the blue square to reveal a translation note. Now click the "Close" link and notice that the verse is now on two separate lines. I want it to be one line.
If you know the solution and would like to help make the Bible App better, please <a href="mailto:[email protected]">email me.</a> Thanks!
</p>
<hr>
<div class="p">
<span class="verse v1" data-usfm="GEN.1.1">
<span class="label">
1
</span>
<span class="content">
In the
</span>
<span class="note x">
<span class="label">
#
</span>
<span class="body">
Job 38:4-7; Ps. 33:6; 136:5; Isa. 42:5; 45:18; John 1:1-3; Acts 14:15; 17:24; Col. 1:16, 17; Heb. 1:10; 11:3; Rev. 4:11
</span>
</span>
<span class="content">
beginning, God created the heavens and the earth.
</span>
</span>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
/*document.querySelector('.note > .label').onclick = function () {
document.querySelector('.note > .body').style.display = 'block';
document.querySelector('.note > .body').innerHTML = "<a href='#' class='note_close'>Close</a>";
document.querySelector('.note > .body .note_close').onclick = function () {
this.parentNode.style.display = 'none';
};
};*/
$(document).ready(function(){
$('.note > .label').click(function(){
$('.note').addClass('open');
$('.note .body').html("");
$("<a href='#' class='note_close'>Close</a>").click(function () {
//alert('hi');
$('.note').removeClass('open');
//$(this).parent().hide()//.css('display', 'none');
}).appendTo($('.note .body'));
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment