How do I select something that ends with a certain text using jQuery?
Use the $ symbol, like this:
$(‘a[href$=.pdf]‘).addClass(‘pdflink’);
In: JavaScript, jQuery, Web Design, Web Programming · Tagged with: JavaScript, jQuery
What is a negation pseudo-class in jQuery?
It’s expressed with the :not keyword.
For example:
$(document).ready(function() {
$(‘#body_parts > li’).addClass(‘limbs’);
$(‘#body_parts li:not(.limbs)’).addClass(‘naughty_bits’);
});
This time we’re selecting all the descendants of the li tag that doesn’t have the .limbs class attached to them.
In: JavaScript, jQuery, Web Design, Web Programming · Tagged with: JavaScript, jQuery
What is a “child combinator” in jQuery?
> sign that allows you to select a child of indicated object.
For example:
$(document).ready(function() {
$(‘#human_body > li’).addClass(‘limbs’);
});
This code says: fund all items that are children (“direct descendants”) of the #human_body ID and attach the .limbs class to them.
In: JavaScript, jQuery, Web Design, Web Programming · Tagged with: JavaScript, jQuery
How do I remove a class from a page element with jQuery?
Use the removeClass() method. See also the enry on addClass().
In: JavaScript, jQuery, Web Design, Web Programming
How do I add a class to a page element with jQuery?
Use addClass() method. Keep in mind that the name of the class in the parentheses should be enclosed in quotes and should NOT include the period before the name. For example:
$(document).ready(function() {
$(‘.myClass’).addClass(‘myOtherClass’);
});
In: JavaScript, jQuery, Web Design, Web Programming
How do I clone elements with jQuery?
use clone() function.
How do I use prepend function in jQuery?
Here’s a humorous example of both append and prepend functions:
In: JavaScript, jQuery, Web Design, Web Programming · Tagged with: JavaScript, jQuery
How to use append() function of jQuery?
See this humorous example:
In: JavaScript, jQuery, Web Design, Web Programming
What plugin allows to create keyframe animations with jQuery?
http://plugins.jquery.com/project/Keyframe
In: JavaScript, jQuery, Web Design, Web Programming · Tagged with: javaScipt, jQuery
What is a good visual interactive joke with jQuery?
When elements with predictable action behave unpredictably.
For example, people reach for the button, because they know they are supposed to click it, but as before they have a chance to click it, an animation happens on mouse-over, rather than on click.
How do I use id attribute in jQuery?
You should place a pound sine in front of the id name: #myIDName – similarly to how it’s done in CSS.
In: JavaScript, jQuery, Web Design, Web Programming · Tagged with: JavaScript, jQuery
How do I add jQuery to my HTML page?
<script type=”text/javascript” src=”js/jquery-1.5.2.min.js”></script>
(The current jQuery version is 1.5.2. – it could be different when you’re reading this page.)
In: Animation, JavaScript, jQuery, Web Design, Web Programming · Tagged with: Animation, JavaScript, jQuery, Web Design, Web Programming
How do I select something that begins with a certain text using jQuery?
Use ^ symbol, like this:
$(‘a[href^=mailto:]‘).addClass(‘mailto’);
In: JavaScript, jQuery, Web Design, Web Programming
How do I access all images that have an alt attribute with jQuery?
$(‘img[alt]‘)
In: JavaScript, jQuery, Web Design, Web Programming · Tagged with: JavaScript, jQuery
What is “chroma”?
Chroma, or chrominance – is a hue and saturation of the picture.
In: Color, Color Correction, Film Editing, General Information, General Terms, General Video Editing Techniques, Uncategorized, Video Editing
