RJSBAK

download RJSBAK

of 2

Transcript of RJSBAK

  • 8/12/2019 RJSBAK

    1/2

    [email protected] SEBASTIAN HLT BAK

    Week 1:

    Pre class thoughts:

    Completion of the codeacademy js track was hard at times, but also progressed abit slowly, which at could at times be frustrating. That being said, its a great

    supportive tool. Ive been starting to grasp the language in a way thatformulating sentances might not seem a complete impossibility.

    Class:

    Todays session was unfortunately halted by an almost complete lack of internet

    acess, so we never got beyond trying to install Kattegat and so forth. SometimesI wonder if ITU is some kind of weird modern analogy of the Sisyphos myth,

    where the rock is the wi-fi, and everyday is a constant and never ending struggle

    to the top of the functionality mountain (no more tangents for today).

    Keywords of the day (terminal wise): pwd gives you the current path (very useful

    when starting up and finding location of kattegat). Ls lists directory, and ctrl+cstops the server. Cd creates the directory!

    This also concludes the initial creation of my reflective journal.

    Week 2:

    Ive been experimenting a lot with making multiple squares appear, along with

    trying to develop my understanding of this language further with Eloquent JS,the r/learnjavascripton reddit, which is a great little subreddit with an

    attached IRC chatwhere people can interact and help each other.

    http://javascriptissexy.com/how-to-learn-javascript-properly/ is also

    quite useful.

    Today I managed to utilize the http://ricostacruz.com/jquery.transit/

    possibilities from the square-example code.

    I wanted 4 different squares assigned to each arrow key. To make them have

    different transitions, I needed to create separate classes, which could be done

    through the makeSquare function (unction makeSquare(cls, css):

    Afterwards, the cls is added after the class= string.

    var x = $('' + squareCount

    + '') and is added to the css.

    To make the different transitions for the squares, I used an if else bracket. The

    e.which == 37 was found with console.log on the e.which. Rather simple:function onKeypress(e) {

    console.log(e.which)

    if (e.which == 37) {

    console.log("VENSTRE")

    makeSquare("hueylewis",{left: "300px",

    top: "100px","background-color": "blue"

  • 8/12/2019 RJSBAK

    2/2

    [email protected] SEBASTIAN HLT BAK

    })

    for (var i = 0; i