Giter Site home page Giter Site logo

your-own-js-and-css-in-rails-v-000's Introduction

Your Own Js And Css In Rails

Objectives

  1. Write your own CSS and integrate it into the asset pipeline and use it in views.
  2. Write your own JS and integrate it into the asset pipeline and use it in views.

Objectives

Located in this repository is a simple Rails application. Your goal is to create your own JS and CSS and include it into the application. You can run the Capybara spec when you are finished to test your solution.

First add the following JS:

  • In /app/assets/javascripts/ create the file hide.js
  • Create the function hideWhenClicked that hides the element that was clicked.
    • Make sure to bind to #hide_this
  • Add hide.js to your JS manifest.

Next add the following CSS:

  • In /app/assets/stylesheets/ create the file links.css
  • Create a CSS class called .error that changes the color of the text to red. Add this CSS class to the link on the root page.
  • Create another CSS class called .cool-background that makes the background grey. Add this CSS class to the <body> tag on the application layout.
  • Add links.css to your CSS manifest.

View Your Own Js And Css In Rails on Learn.co and start learning to code for free.

your-own-js-and-css-in-rails-v-000's People

Contributors

cbdileo avatar blake41 avatar bhollan avatar ghaash avatar aviflombaum avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.