Quotes help make search much faster. Example: "Practice Makes Perfect"
Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts
Friday, June 7, 2013
Codeschool Sample Solution Keyup Event Handler II
$(document).ready(function() {
$("#nights").on("keyup", function() {
//var days = $(this).val();
//var pricePerDay = $(".tour").data('daily-price');
//var totalPrice = days * pricePerDay;
//$("#nights-count").text(days);
//$("#total").text(totalPrice);
$("#nights-count").text($(this).val());
$("#total").text($(this).val() * $(this).closest(".tour").data('daily-price'));
});
});
Codeschool Sample Solution Keyup Event Handler I
$(document).ready(function() {
$("#nights").on("keyup", function() {
$("#nights-count").text($(this).val());
});
});
Codeschool Sample Solution Keyup Event
$(document).ready(function() {
$("#nights").on('keyup', function(){
});
});
Codeschool Sample Solution Mouseleave
$(document).ready(function() {
$("#tour").on("click", "button", function() {
$(".photos").slideToggle();
});
$(".photos").on("mouseenter", "li", function() {
$(this).find("span").slideToggle();
});
$(".photos").on("mouseleave", "li", function() {
$(this).find("span").slideToggle();
});
});
Thursday, June 6, 2013
Codeschool Sample Solution Mouseover II
$(document).ready(function() {
$("#tour").on("click", "button", function() {
$(".photos").slideToggle();
});
$(".photos").on("mouseenter", "li", function() {
$(this).find("span").slideToggle();
});
});
Codeschool Sample Solution Mouseover I
$(document).ready(function() {
$("#tour").on('click', 'button', function() {
$(".photos").slideToggle();
});
$(".photos").on('mouseenter', 'li', function(){
});
});
Codeschool Sample Solution Slide Effect II
$(document).ready(function() {
$("#tour").on("click", "button", function() {
$(".photos").slideToggle();
});
});
Codeschool Sample Solution Slide Effect I
$(document).ready(function() {
$("#tour").on("click", "button", function() {
$('.photos').slideDown();
});
});
Codeschool Sample Solution On Load II
$(document).ready(function() {
$('#tour').on('click', 'button', function(){
alert('I was clicked!');
});
});
Codeschool Sample Solution On Load I
$(document).ready(function(){
var numPhotos = $('img').length;
alert(numPhotos);
});
Codeschool Sample Solution New Filter III
$(document).ready(function(){
$("#filters").on("click", ".on-sale", function(){
$(".highlight").removeClass();
$(".tour").filter(".on-sale").addClass("highlight");
});
$("#filters").on("click", ".featured", function(){
$(".highlight").removeClass();
$(".tour").filter(".featured").addClass("highlight");
});
});
Codeschool Sample Solution New Filter II
$(document).ready(function(){
$("#filters").on("click", ".on-sale", function(){
$(".tour").filter(".on-sale").addClass("highlight");
});
});
Codeschool Sample Solution New Filter I
$(document).ready(function(){
//Create the click handler here
$("#filters").on("click", ".on-sale", function(){
});
});
Codeschool Sample Solution Better On Handlers
$(document).ready(function(){
$(".tour").on("click","button", function(){
var tour = $(this).closest(".tour");
var discount = tour.data("discount");
var message = $("<span>Call 1-555-jquery-air for a $" + discount + "</span>");
tour.append(message);
$(this).remove();
});
});
Codeschool Sample Solution Refactoring
$(document).ready(function(){
$("button").on("click", function(){
var tour = $(this).closest(".tour");
var discount = tour.data("discount");
var message = $("<span>Call 1-555-jquery-air for a $" + discount + "</span>");
tour.append(message);
$(this).remove();
});
});
Codeschool Sample Solution Fetching Data from the DOM II
$(document).ready(function(){
$("button").on("click", function(){
var discount = $(this).closest(".tour").data("discount");
//alert(discount); //for checking
var message = $("<span>Call 1-555-jquery-air for a $"+discount+" discount</span>");
$(this).closest(".tour").append(message);
$(this).remove();
});
});
Codeschool Sample Solution Fetching Data from DOM I
$(document).ready(function(){
$('button').on('click', function(){
var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
var discount = $(this).closest(".tour").data("discount");
$(this).closest(".tour").append(message);
$(this).remove();
//alert(discount); //prove that value of data is stored in var discount
});
});
Codeschool Sample Solution Relative Traversing III
$(document).ready(function(){
$(".tour").on("click", function(){
var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
$(this).closest(".tour").append(message);
$(this).find(".book").remove();
});
});
Codeschool Sample Solution Traversing II
$(document).ready(function(){
$('button').on('click', function(){
var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
$(this).closest("li").append(message);
$(this).remove();
});
});
Codeschool Sample Solution Relative Traversing I
$(document).ready(function(){
$("button").on("click", function(){
var message = $("<span>Call 1-555-jquery-air to book this tour</span>");
$(this).parent().append(message);
$(this).remove();
});
});
Subscribe to:
Posts (Atom)
This is an example of scrolling text using Javascript.
Popular Posts
-
favorite_animal ||= "dog" favorite_animal ||= "cat"
-
//sample solution var yourName = "Pam"; var gender = "female"; var result; //Line 10 starts an if statement //Ne...
-
//sample solution def isEven(x): if(x % 2 == 0): return "yep" else: return "nope"
-
<!--sample solution--> <html> <head> <title>Week 13 Project</title> </head> ...
-
<!-- Sample solution to index.html --> <!DOCTYPE html> <html> <body> <div class="nav"> ...
-
<html> <head> <!-- Add the Parse SDK here! --> <script src="http://www.parsecdn.com/js/par...
-
Answer: Alt - p p stands for previous. If you keep pressing Alt - p, you will continue cycling back through commands you typed before. I...
-
#sample solution hungry = false unless hungry puts "I'm writing Ruby programs!" else puts "Time to eat!...
-
$("#tours > li")
-
$(document).ready(function(){ $("#filters").on("click", ".on-sale", function(){ $(".tour")....