Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8196087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:21:55+00:00 2026-06-07T05:21:55+00:00

I am getting this error in the firebug console and can’t work out why.

  • 0

I am getting this error in the firebug console and can’t work out why. My code is as follows:

$(document).ready(function(){
    var header = $('h2#chase');
    var headerOffset = header.offset();
    header.css({
        "position" : "absolute",
        "left" : headerOffset.left+"px",
        "top" : headerOffset.top+"px"
    });

    var headerSize = {width: header.width(), height: header.height()};
    var headerBounds = {top: headerOffset.top, right: headerOffset.left + headerSize.width, bottom: headerOffset.top + headerSize.bottom, left: headerOffset.left};
    var windowBounds = {top: 0, right: $(window).width() - headerSize.width, bottom: $(window).height() - headerSize.height, left: 0};
    var maxLeft = $(window).width() - headerSize.width;
    var maxTop = $(window).height() - headerSize.height;

    var margin = 30;

    $(window).mousemove(function(e){
        headerOffset = header.offset();
        headerBounds = {top: headerOffset.top, right: headerOffset.left + headerSize.width, bottom: headerOffset.top + headerSize.height, left: headerOffset.left};
        var sides = whichSides(e.pageX, e.pageY);
        $.each(sides, function(key, value) {
            header.css({
                value.side : value.newValue+"px"
            })
        });
    });

    function whichSides(mouseX, mouseY) {
        var sides = [];
        var sideOffsets = {top: headerBounds.top - mouseY, right: mouseX - headerBounds.right, bottom: mouseY - headerBounds.bottom, left: headerBounds.left - mouseX};
        var newValues = {top: mouseY + margin, right: mouseX - margin, bottom: mouseY - margin, left: mouseX + margin};
        $.each(sideOffsets, function(key, value) {
            if (value < 30 && value >= 0) {
                sides.push({side: key, newValue: newValues[key]});
            }
        });
        return sides;
    }
});

The error firebug is returning:

    missing : after property id (line 24, col 9)
    value.side : value.newValue+"px"

Edit: Apologies I seem to of posted the code from a draft I wrote earlier this morning, I have since updated it with the truly erronous code.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:21:57+00:00Added an answer on June 7, 2026 at 5:21 am

    In this bit:

    header.css({
        value.side : value.newValue+"px"
    })
    

    value.side is not a valid construct to be on the left hand side of :

    I’m not sure what you’re trying to do but it should something more on the lines of:

    header.css({
        side : value.newValue+"px"
    })
    

    After reading your comment, you could do this:

    var o = {}
    
    o[value.side] = value.newValue+'px';
    
    header.css(o);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my code - I am getting an error in my firebug console that
While developing with Firebug I keep getting this error. pages[x].css(z-index,x) is not a function
Am getting this error for my code: Undefined symbols for architecture x86_64: _spendDollars, referenced
i m getting error in firebug console uncaught exception: [Exception... 'Invalid save data.' when
I have been trying to remove this Firebug Console Error from last few hours.
I am getting a TestFunc is not defined error when this bit of code...
I keep getting this error in Firebug: d is undefined [Break On This Error]
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
Getting this error when try to add an item to my repositories/context: Collection has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.