Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS New to coding – jscript and css transitions on page load issue

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #45009

    Hi All,

    I am new to coding and coding my first ever website

    see here: [My personal site](http://www.overtongraphics.com/overtongraphics/overtongraphics.html “”)

    I was getting my links growing and changing colour into what i had defined (on page load) – i think because i have css transitions on the default css for those classes, intended to make the links smooth back to that after hover off.

    So i followed Chris’s tutorial here (thinking its related)
    [transitions only after page load](https://css-tricks.com/transitions-only-after-page-load/ “”)

    I copied everything, but maybe i’m not linking to my javascript correctly – never linked to jscript before. (because now all my transitions are permanently disabled)

    this is the code in my head.

    _

    Josh Example
    language=”javascript” src=”javascript.js”> _

    and this is ALL the code i have in my javascript file

    _$(“window”).load(function() {
    $(“body”).removeClass(“preload”);
    });_

    on chrome inspector it says an error by my javascript

    _Uncaught ReferenceError: $ is not defined_

    So i guess I don’t know how to set up a jscript file basically

    Any help would be hugely appreciated for this budding coder!

    Thanks

    Josh

    #136536

    head code again



    Josh Example
    language=”javascript” src=”javascript.js”>

    #136537



    Josh Example
    language=”javascript” src=”javascript.js”>

    #136538

    Sorry – ddint know how to copy it to the post

    #136540

    I made a codepen if easier – sorry new to these forums posting – but been reading for a while

    http://codepen.io/seraphzz/pen/Llkqo

    #136541
    Paulie_D
    Member

    Off hand it looks like you aren’t referencing/loading jQuery first before your script.

    https://css-tricks.com/video-screencasts/20-introduction-to-jquery/

    #136545

    Thanks @Paulie_D

    I’ve tried following the video and adding allt hat – can you please look at my site again because its still not owrking

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.