0

I have a file named custom.js, and I'm just putting

<script src="custom.js"></script>

In the required places, but I keep getting a syntax here in the console.

$(document).ready(function() {
    var m = document.getElementById('customprofile');
var str = "index.php?/profile/1-brandon/";
     if(window.location.href.includes(str)){

        document.getElementsByTagName("html")[0].setAttribute("class", "none");
        $("body").css({
            "background-color": "#FFFFFF",
        });
        document.getElementById("elProfileTabs_content").style.backgroundColor = "rgba(13, 13, 13, .9)", 
        document.body.style.backgroundImage = "url('https://encrypted-tbn0.gstatic.com/images?      q=tbn:ANd9GcSApUa6V0POxeHbBFzjjtsLhicnFKbQzJgXQgGcHJ_iXu4p8dhHIw')";
    document.body.style.backgroundSize = "15%";
     }

}

2
  • 1
    "a syntax here in the console." — What, exactly, does the error message say? Commented Mar 16, 2017 at 21:33
  • Check your WebServer, if the response will not provide Content-Type: text/javascript, it can breaks. Additional: are you sure, your custom.js is stored/uploaded relative to the path? Check your JavaScript-Console: what is the complete response (incl. Header)? Commented Mar 16, 2017 at 21:36

1 Answer 1

2

I think you're missing ); after the last } to close the .ready function.

Sign up to request clarification or add additional context in comments.

1 Comment

seems to be what it is from what I was looking at as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.