How to shorthand if else in jQuery function?

Would learning each property/tag/function in a css/html/jquery be a good way to learn?

  • I was taking a look at the documentation for HTML/CSS/jQuery and the amount of properties/tags/functions wasn't as much as I thought. Would making a project for each individual item be a good way of learning web development?

  • Answer:

    The best way to learn development is just to start building things. Anything. Big things, small things, whole sites, modules, anything. If you're going to build something based around each tag and each CSS selector, you'll definitely learn, but it's not the memorization of the tags that will have taught you; it's the fact that you built so many damned things. I don't think it's the 'best' way to learn, but whatever works for you works. If you really are going to systematically build something for each 'item', write or blog about the process. And build the blog too. ;) Good luck!

Lee Waters at Quora Visit the source

Was this solution helpful to you?

Other answers

Would you learn a foreign language by reading a dictionary? Probably not. Simply learning the definitions of things doesn't necessarily help you tie them together. You're better off using a resource like the https://developer.mozilla.org/en-US/ or Codecademy.

Matt Muller

Learn as you go, you won't get much out of just studying the properties until you have experience with them. Luckily, HTML and CSS go hand in hand and because they are a markup language, are relatively simple to learn. I learned HTML and CSS by just creating website templates, a lot of templates. Start out with HTML, creating search engine optimized pages where, when viewing the page source, it looks like a piece of art. You will very quickly grasp the basic document structure of web pages, and from there you should check out all the cool new elements HTML5 provides, especially when it comes to forms. Utilizing these new elements will not only make it optimized for search engines, but mobile as well. I recommend checking out http://html5doctor.com/ for best practices on the new elements. After you are done creating those ugly plain HTML pages, look into CSS. After you understand the box model, pixel v em v percent, element state (hover, active, etc), and positioning, the rest of it is just your artistic touch. Some basic things to do in CSS is create horizontal navigation (pure CSS dropdowns are a plus), sidebars, and image links and lists. It's also a good idea to know how to make static elements that scroll with the page (like the Quora top bar). I have found http://css-tricks.com/ to be an invaluable resource when looking for cool new style ideas. The things that can be done in CSS(2 and 3) are ridiculous, and there's always something new to learn. As for jQuery, I'm just going to have to stop you right there. Why do you want to learn jQuery? What compelling features does it provide that you must learn it inside and out? Sure, jQuery makes selecting elements in the DOM easy, but don't use it as a crutch when developing your applications. Believe it or not, it's not that difficult to create image sliders and animations without jQuery. If you are going to learn jQuery though, which you likely will as it's somehow treated as part of ECMAScript by the design community (jQuery ALL the things!), learn JavaScript first. You can use a site like Codecademy to get your feet wet, understanding the basics of how to create simple web apps, but also look into other sources like Eloquent JavaScript to gain a deeper understanding of the fundamentals (then Professional JavaScript for Web Developers for more advanced topics).

Seth Moon

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.