Quantcast
Channel: Baris Aydinoglu » element
Browsing all 5 articles
Browse latest View live

Am I Referencing the jQuery Object or a DOM Element?

Even when you have a basic understanding of when the this keyword points to a DOM element or to a jQuery object, the concept can still be confusing once you save the value of this to a variable....

View Article



Write your own selectors

jQuery has loads of built-in selectors for selecting elements by ID, class, tag, attribute and many more. But what do you do when you need to select elements based upon something else and jQuery...

View Article

Use IDs instead of classes wherever possible

jQuery makes selecting DOM elements using classes as easy as selecting elements by ID used to be, so it’s tempting to use classes much more liberally than before. It’s still much better to select by ID...

View Article

Using chaining properly

One of the coolest things about jQuery is it’s ability to chain method calls together. So, for example, if you want to switch the class on an element. $('myDiv').removeClass('off').addClass('on'); If...

View Article

Image may be NSFW.
Clik here to view.

The 30 CSS Selectors you Must Memorize

1. * * { margin: 0; padding: 0; } Let’s knock the obvious ones out, for the beginners, before we move onto the more advanced selectors. The star symbol will target every single element on the page....

View Article

Browsing all 5 articles
Browse latest View live


Latest Images