(Ebook) jQuery Reference Guide: A Comprehensive Exploration of the Popular JavaScript Library by Jonathan Chaffer, Karl Swedberg ISBN 9781847193810, 1847193811pdf download
(Ebook) jQuery Reference Guide: A Comprehensive Exploration of the Popular JavaScript Library by Jonathan Chaffer, Karl Swedberg ISBN 9781847193810, 1847193811pdf download
https://ebooknice.com/product/learning-jquery-1-3-1266146
https://ebooknice.com/product/learning-jquery-third-edition-2395766
https://ebooknice.com/product/learning-jquery-4380222
(Ebook) Learning jQuery: Better Interaction Design and Web
Development with Simple Javascript Techniques by Jonathan
Chaffer, Karl Swedberg ISBN 9781847192509, 1847192505
https://ebooknice.com/product/learning-jquery-better-interaction-design-
and-web-development-with-simple-javascript-techniques-983158
https://ebooknice.com/product/learning-jquery-4th-edition-better-
interaction-design-and-web-development-with-simple-javascript-
techniques-5474156
https://ebooknice.com/product/biota-grow-2c-gather-2c-cook-6661374
jQuery Reference Guide
Jonathan Chaffer
Karl Swedberg
BIRMINGHAM - MUMBAI
jQuery Reference Guide
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the authors, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-847193-81-0
www.packtpub.com
[ ii ]
Table of Contents
.find() 47
.children() 48
.parents() 50
.parent() 51
.siblings() 52
.prev() 53
.next() 54
Miscellaneous Traversal Methods 55
.add() 55
.is() 57
.end() 58
Chapter 4: DOM Manipulation Methods 61
General Attributes 61
.attr(attribute) 61
.attr() 63
.removeAttr() 64
Style Properties 65
.css(property) 65
.css() 66
.height() 67
.height(value) 67
.width() 68
.width(value) 68
Class Attribute 69
.addClass() 69
.removeClass() 69
.toggleClass() 70
DOM Replacement 71
.html() 71
.html(HTML) 72
.text() 72
.text(text) 73
.val() 74
.val(value) 74
DOM Insertion, Inside 75
.prepend() 75
.prependTo() 76
.append() 78
.appendTo() 80
DOM Insertion, Outside 81
[ iii ]
Table of Contents
.before() 81
.insertBefore() 83
.after() 84
.insertAfter() 86
DOM Insertion, Around 88
.wrap() 88
DOM Copying 89
.clone() 89
DOM Removal 91
.empty() 91
.remove() 93
Chapter 5: Event Methods 95
Event Handler Attachment 95
.bind() 95
.unbind() 99
.one() 101
.trigger() 102
Document Loading 103
$() 103
.load() 105
.unload() 106
.error() 106
Mouse Events 107
.mousedown() 107
.mouseup() 109
.click() 110
.dblclick() 111
.toggle() 112
.mouseover() 113
.mouseout() 114
.hover() 115
.mousemove() 116
Form Events 118
.focus() 118
.blur() 119
.change() 120
.select() 122
.submit() 123
Keyboard Events 124
.keydown() 124
[ iv ]
Table of Contents
.keypress() 126
.keyup() 127
Browser Events 128
.resize() 129
.scroll() 129
Chapter 6: Effect Methods 131
Pre-Packaged Effects 131
.show() 131
.hide() 133
.toggle() 135
.slideDown() 137
.slideUp() 138
.slideToggle() 139
.fadeIn() 141
.fadeOut() 143
.fadeTo() 144
Customized Effects 146
.animate() 146
Chapter 7: AJAX Methods 149
Low-Level Interface 149
$.ajax() 149
$.ajaxSetup() 153
Shorthand Methods 154
$.get() 154
$.getIfModified() 155
.load() 156
.loadIfModified() 157
$.post() 157
$.getJSON() 158
$.getScript() 159
Global AJAX Event Handlers 160
.ajaxComplete() 161
.ajaxError() 162
.ajaxSend() 163
.ajaxStart() 164
.ajaxStop() 165
.ajaxSuccess() 166
Helper Function 167
.serialize() 167
[]
Table of Contents
[ vi ]
Table of Contents
.scrollLeft(value) 206
.offset() 207
.position() 212
Chapter 11: Form Plug-In 215
AJAX Form Submission 215
.ajaxSubmit() 215
.ajaxForm() 217
.ajaxFormUnbind() 223
Retrieving Form Values 223
.formToArray() 223
.formSerialize() 224
.fieldSerialize() 225
.fieldValue() 226
Form Manipulation 228
.clearForm() 228
.clearFields() 229
.resetForm() 230
Appendix A: Online Resources 233
jQuery Documentation 233
JavaScript Reference 234
JavaScript Code Compressors 235
(X)HTML Reference 235
CSS Reference 235
XPath Reference 236
Useful Blogs 236
Web Development Frameworks Using jQuery 238
Appendix B: Development Tools 239
Tools for Firefox 239
Tools for Internet Explorer 240
Tools for Safari 241
Other Tools 241
Index 243
[ vii ]
Preface
jQuery is a powerful, yet easy-to-use JavaScript library that helps web developers
and designers add dynamic, interactive elements to their sites, smoothing out
browser inconsistencies and greatly reducing development time. In jQuery Reference
Guide, you can investigate this library's features in a thorough, accessible format.
This book offers an organized menu of every jQuery method, function, and selector.
Entries are accompanied by detailed descriptions and helpful recipes that will assist
you in getting the most out of jQuery and avoiding the pitfalls commonly associated
with JavaScript and other client-side languages. If you're still hungry for more,
the book shows you how to cook up your own extensions with jQuery's elegant
plug-in architecture.
You'll discover the untapped possibilities that jQuery makes available and hone your
skills as you return to this guide time and again.
The heart of the book is a set of reference chapters that allow you to quickly look up
the details of any jQuery method. Chapter 2 lists every available selector for finding
page elements.
Chapter 3 builds on the previous chapter with a catalog of jQuery methods for finding
page elements.
Preface
Chapter 4 describes every opportunity for inspecting and modifying the HTML
structure of a page.
Chapter 5 details each event that can be triggered and reacted to by jQuery.
Chapter 6 defines the range of animations built into jQuery, as well as the toolkit
available for building your own.
Chapter 7 lists the ways in which jQuery can initiate and respond to server
communication without refreshing the page.
Chapter 8 covers the remaining capabilities of the jQuery library that don't neatly fit
into the other categories.
In the final three chapters, you'll dive into the extension mechanisms jQuery makes
available. Chapter 9 reveals four major ways to enhance jQuery's already robust
capabilities using a plug-in.
Chapter 10 walks you through the advanced measurement tools available in the
popular Dimensions plug-in.
Chapter 11 empowers you to bring AJAX technology and HTML forms together, a
process which is made easy by the Form plug-in.
The reader will need the basics of HTML and CSS, and should be comfortable with
the syntax of JavaScript. No knowledge of jQuery is assumed, nor is experience with
any other JavaScript libraries required.
[]
Preface
Conventions
In this book, you will find a number of styles of text that distinguish between
different kinds of information. Here are some examples of these styles, and an
explanation of their meaning.
There are three styles for code. Code words in text are shown as follows: "Taken
together, $() and .addClass() are enough for us to accomplish our goal of
changing the appearance of the poem text."
When we wish to draw your attention to a particular part of a code block, the
relevant lines or items will be made bold:
$(document).ready(function() {
$('a[@href$=".pdf"]').addClass('pdflink');
});
New terms and important words are introduced in a bold-type font. Words that you
see on the screen, in menus or dialog boxes for example, appear in our text like this:
"The next step is to run those tests by clicking the All button".
Reader Feedback
Feedback from our readers is always welcome. Let us know what you think about
this book, what you liked or may have disliked. Reader feedback is important for us
to develop titles that you really get the most out of.
[]
Preface
If there is a book that you need and would like to see us publish, please send
us a note in the SUGGEST A TITLE form on www.packtpub.com or
email suggest@packtpub.com.
If there is a topic that you have expertise in and you are interested in either writing
or contributing to a book, see our author guide on www.packtpub.com/authors.
Customer Support
Now that you are the proud owner of a Packt book, we have a number of things to
help you to get the most from your purchase.
Errata
Although we have taken every care to ensure the accuracy of our contents, mistakes
do happen. If you find a mistake in one of our books—maybe a mistake in text or
code—we would be grateful if you would report this to us. By doing this you can
save other readers from frustration, and help to improve subsequent versions of
this book. If you find any errata, report them by visiting http://www.packtpub.
com/support, selecting your book, clicking on the Submit Errata link, and entering
the details of your errata. Once your errata are verified, your submission will be
accepted and the errata added to the list of existing errata. The existing errata can be
viewed by selecting your title from http://www.packtpub.com/support.
Questions
You can contact us at questions@packtpub.com if you are having a problem with
some aspect of the book, and we will do our best to address it.
[]
Anatomy of a jQuery Script
He's got a brand new start
Now he's a happy guy
—Devo,
"Happy Guy"
A typical jQuery script uses a wide assortment of the methods that the library
offers. Selectors, DOM manipulation, event handling, and so forth come into play
as required by the task at hand. In order to make the best use of jQuery, we need to
keep in mind the wide range of capabilities it provides.
This book will itemize every method and function found in the jQuery library. Since
there are many methods and functions to sort through, it will be useful to know what
the basic categories of methods are, and how they come into play within a jQuery
script. Here we will see a fully functioning script, and examine how the different
aspects of jQuery are utilized in each part of the script.
Our table of contents will be nestled on the top right corner of the page:
We'll have it collapsed initially as shown above, but a click will expand it to
full height:
[]
Chapter 1
At the same time, we'll add a feature to the main body text. The introduction of the
text on the page will not be initially loaded, but when the user clicks on the word
Introduction, the introductory text will be inserted in place from another file:
Before we reveal the script that performs these tasks, we should walk through the
environment in which the script resides.
Obtaining jQuery
The official jQuery website (http://jquery.com/) is always the most up-to-date
resource for code and news related to the library. To get started, we need a copy
of jQuery, which can be downloaded right from the home page of the site. Several
versions of jQuery may be available at any given moment; the latest uncompressed
version will be most appropriate for us.
[]
Anatomy of a jQuery Script
</div>
</div>
</body>
</html>
The actual layout of files on the server does not matter. References from
one file to another just need to be adjusted to match the organization
we choose. In most examples in this book, we will use relative paths to
reference files (../images/foo.png) rather than absolute paths (/
images/foo.png). This will allow the code to run locally without the
need for a web server.
The stylesheet is loaded immediately after the standard <head> elements. Here are
the portions of the stylesheet that affect our dynamic elements:
/* -----------------------------------
Page Table of Contents
-------------------------------------- */
#page-contents {
position: absolute;
text-align: left;
[]
Chapter 1
top: 0;
right: 0;
width: 15em;
border: 1px solid #ccc;
border-top-width: 0;
border-right-width: 0;
background-color: #e3e3e3;
}
#page-contents h3 {
margin: 0;
padding: .25em .5em .25em 15px;
background: url(arrow-right.gif) no-repeat 0 2px;
font-size: 1.1em;
cursor: pointer;
}
#page-contents h3.arrow-down {
background-image: url(arrow-down.gif);
}
#page-contents a {
display: block;
font-size: 1em;
margin: .4em 0;
font-weight: normal;
}
#page-contents div {
padding: .25em .5em .5em;
display: none;
background-color: #efefef;
}
/* -----------------------------------
Introduction
-------------------------------------- */
.dedication {
margin: 1em;
text-align: center;
border: 1px solid #555;
padding: .5em;
}
After the stylesheet is referenced, the JavaScript files are included. It is important that
the script tag for the jQuery library be placed before the tag for our custom scripts;
otherwise, the jQuery framework will not be available when our code attempts to
reference it.
[]
Anatomy of a jQuery Script
$(document).ready(function() {
$('<div id="page-contents"></div>')
.prepend('<h3>Page Contents</h3>')
.append('<div></div>')
.prependTo('body');
$('#content h2').each(function(index) {
var $chapterTitle = $(this);
var chapterId = 'chapter-' + (index + 1);
$chapterTitle.attr('id', chapterId);
$('<a></a>').text($chapterTitle.text())
.attr({
'title': 'Jump to ' + $chapterTitle.text(),
'href': '#' + chapterId
})
.appendTo('#page-contents div');
});
$('#page-contents h3').click(function() {
$(this).toggleNext();
});
We now have a dynamic table of contents that brings users to the relevant portion of
the text, and an introduction that is loaded on demand.
[ 10 ]
Chapter 1
Script Dissection
This script has been chosen specifically because it illustrates the widespread
capabilities of the jQuery library. Now that we've seen the code as a whole, we can
identify the categories of methods used therein.
We will not discuss the operation of this script in much detail here, but a
similar script is presented as a tutorial on the Learning jQuery web log:
http://www.learningjquery.com/2007/06/
automatic-page-contents.
Selector Expressions
Before we can act on an HTML document, we need to locate the relevant portions. In
our script, we sometimes use a simple approach to finding an element:
$('#introduction')
This expression creates a new jQuery object that references the element with the ID
introduction. On the other hand, sometimes we require a more intricate selector:
[ 11 ]
Random documents with unrelated
content Scribd suggests to you:
My own plan is as follows: Two packs, exactly alike are used. As to
one of these, I treat all four corners after the manner indicated by
Mr. Farrelly, when any card of the second pack, inserted into the one
so treated, naturally becomes in effect, a long card. There is in this
case no need to reverse the pack, and as the minute projection is
duplicated at each end of the diagonal, a less degree of rounding off
is necessary.
As a practical illustration of the possible uses of such a pack, I
offer the trick which I am about to describe. The expert will
recognise that, save for the use of the new pack, it is merely a
combination of well-known methods, but as regards the mode of
presentation it is original, and I think will be found worthy of a place
in the répertoire of the card-conjurer.
For the purpose of description we will call the pack with rounded
corners the “short,” and the other the “long” pack. Three known
cards are borrowed from the long pack, which may then be put
aside, as it plays no further part in the trick. These three cards are
palmed, and after the short pack has been shuffled by one of the
company, are added to it, and forced upon three different
spectators. We will suppose that the three selected cards are the
queen of hearts, forced on a gentleman; the king of clubs and the
ten of diamonds; the two last mentioned forced on ladies.
This done, each of the drawers is invited to replace his or her card
in the pack, which is passed from the one to the other for that
purpose, and before it is returned to you is once more shuffled. You
then deliver a “yarn” to something like the following effect:
“Please bear in mind, ladies and gentlemen, exactly what has
been done. To begin with, you have seen that the pack was
thoroughly well shuffled. Three cards were then freely chosen from
it. They have been put back, not by me, but by the persons who
drew them, and the pack has since been shuffled again. It is
therefore obviously impossible that I should know either what cards
have been chosen, or whereabouts they may now be in the pack.
But I enjoy impossibilities. The more impossible a thing is, the more
I want to do it. I will find out these cards or die! Don’t be alarmed, I
don’t mean to die just yet; so I must do the other thing. It’s easy
enough, if you know how to do it.
“In the first place I cut the pack into three portions.” (You cut
three times, nipping the “long” corners between second finger and
thumb, at each of the drawn cards in succession, and placing the
cards left at bottom on one or other of the three heaps; then
solemnly rub your wand, without remark, with a silk handkerchief,
and lay it across the tops of the three packets.)
“Now, if the electric influence is strong enough, the three chosen
cards will gradually sink down to the bottom of these three heaps. A
nice easy way of finding them out, is it not? It will take a minute or
two for the charm to operate, so in the meantime I will try to find
out the names of the cards for myself by thought-reading. You drew
a card, I think, Sir? Will you kindly think of that card, as hard as you
can, and meanwhile look straight at me? Thank you. Judging by
physiognomy, I should say that you were rather a ladies’ man. Don’t
blush, Sir. It’s nothing to be ashamed of, is it, ladies? But he did
blush, didn’t he? Now, being a ladies’ man, you will naturally have
chosen one of the ladies of the pack, that is to say one of the
queens, and your blush suggests that it was a red queen. Now there
are only two red queens to choose from. The queen of hearts
represents Love, and the queen of diamonds Money. If I read your
thoughts aright I feel safe in declaring that you chose the queen of
hearts. That is right, I think? Quite simple, when you know how it’s
done.
“And now, Madam, for your card. I can see at a glance that you
have a liking for aristocratic society, and you will therefore naturally
have chosen a king. But which king? Think hard of your card, please.
A picture of a dark-complexioned gentleman comes up before my
mind’s eye, and I feel that I can say with confidence that the card
you chose was the king of clubs. Am I right?
“And you, Madam. I have an idea that you have a taste for pretty
things, particularly jewellery. Such being the case, you would
naturally choose diamonds. Think of your card, please. Thank you. I
see I was right in my guess. The card you chose was the ten of
diamonds.
“And now to verify my discoveries. If my wand has done its work,
those same three cards will now have percolated through the rest,
and settled down at the bottom of these three heaps. Let us see
whether they have done so.” (The three heaps are turned over.)
“Yes, here we have them: the king of clubs, the queen of hearts,
and the ten of diamonds. It is a curious thing for the cards to do,
and I daresay you would like to know how it is done. As a matter of
fact, it is done by synthetic re-adjustment of dissociated atoms. You
don’t know what that means, perhaps? Well, to say the truth, I don’t
quite know myself, but that is the scientific explanation, so no doubt
it is correct.”
The trick may very well end at this point, but if the reader
possesses a card-box, or other apparatus adapted for “vanishing”
cards, he may bring it to a still more striking conclusion. In this case
he may continue as follows:
“Now, I should like to show you a curious effect of sympathy. I
take away these three cards and hand the rest of the pack to the
gentleman who drew the queen of hearts. Kindly hold it up above
your head where all can see it. The three drawn cards” (show them
one by one) “I place in this box. Again I electrify my wand a little,
and lay it across the box. Now I want each gentleman or lady to
think of his or her card. Think of it kindly, and feel as if you would
like to see it again. Think hard, please, because it is you, not I, that
perform this experiment, and if you don’t think hard it will be a
failure. I am pleased to see by the expression of your countenances
that you are all thinking hard. Thank you very much. You may leave
off now. The deed is done. The three cards have left the box, and
gone back to the pack. Please look it through, sir, and tell the
company whether it is not so.”
The reader, being familiar with the wiles of conjurers, will
doubtless have guessed that the three cards supposed to have
returned to the pack have in fact never left it, being those naturally
belonging to it, corresponding with the three long cards. But to the
outsider their supposed return will be, in the words of the lamented
Lord Dundreary, “one of those things that no fellow can understand.”
As regards the disappearance of the three cards, the performer is
of course by no means restricted to the use of the card-box. If he is
an expert in sleight-of-hand, he may with even better effect,
“vanish” them one by one by means of the back palm, dropping
them a moment later into the profonde.
Thus far, as the reader will doubtless have perceived, the effect
produced (save that a coin instead of a card is dealt with) is
precisely the same as in the case of the card-box. But the “mascot”
has a speciality of its own, in the fact that in that half of the box
marked a (see Fig. 14) a horizontal slot is cut on the side opposite to
the hinge, just long enough and wide enough to allow the passage
of a half-crown. The wood being dead black, this small opening is
invisible save to close inspection, which the box is never called upon
to undergo.
When it is desired to gain secret possession of a coin lent by one
of the company, the lender is invited to place it himself in the box,
held open bookwise as in Fig. 14, the side b of the box having been
previously loaded with a duplicate coin.
The lender of the coin may place it in whichever side of the box he
pleases, but the manner of closing the box will vary accordingly. If
he places it in the side a, the opposite (or loaded) side is treated as
the lid and turned down over a. In this case, the coin being already
in the slotted half, no turn-over of the box is necessary, the
performer having merely to allow the coin to slip out into his hand.
In the opposite case, viz., that of the coin being placed in b, a is
treated as the lid, and the coin being in this case above the disc the
box must be turned over before it can be extracted. If preferred the
performer can hold the box so that the coin will naturally be placed
in b, but in this case the turn-over is unavoidable.
When the box is again opened, the duplicate coin is revealed in
place of the original, which is meanwhile dealt with as may be
necessary for the purpose of the trick. After the borrowed coin has
been extracted, the further fall of the disc closes the slot, and bars
any possibility of the substitute coin escaping in the same way.
The following will be found an easy way of working the exchange.
“For the purpose of my next experiment,” says the performer, “I
shall have to ask the loan of a half-crown; marked in such a way
that you can be sure of knowing it again. I should like one, if
possible, that has seen some service, for a coin in the course of
circulation imbibes a certain amount of magnetic fluid from each
person who handles it; and this renders a well-worn coin more
susceptible to magical influences than a new one.”
The reason alleged for asking the loan of an old coin is of course
“spoof,” but there is a reason; and it is two-fold. In the first place it
ensures your getting a coin tolerably like your own; which you have
chosen in accordance with that description, and which you have
marked after some commonplace fashion, say with a cross scratched
upon one of its faces. Secondly, a well-worn coin, having lost the
sharp edge which is caused by the milling in a new one, passes the
more easily through the slot, which for obvious reasons is kept as
narrow as possible.
Performer, advancing toward the person offering the coin,
continues:
“I don’t want even to touch the coin myself till the very last
moment, so I will ask you meanwhile to put it in this little box. I
believe it was built for a watch-case, but as I don’t happen to need
one, I use it to hold my money, when I have any, or when I can get
somebody to lend me some.”
The box is held open bookwise, as above mentioned, and closed
according to circumstances, in one or the other of the two ways
described.
“I will now ask some gentleman to take charge of the coin in the
box. Who will do so? You will, Sir? Thank you. But stay! I think I
heard somebody say (it was only said in a whisper but I heard it) ‘I
don’t believe the half crown is in the box.’ It is very sad to find
people so suspicious, especially when I take such pains to prove that
there is ‘no deception.’ But the gentleman was wrong, you see.” (He
opens box, and shows the substitute coin.) “Here it is. Take it out,
sir, and keep it in your own hands till I ask you for it again.”
During the delivery of the patter the borrowed coin has been
extracted, and the coin exhibited in the box and handed for safe-
keeping is, of course, the substitute. The box, as being no longer
needed, is laid without remark upon the table, and the trick
proceeds, after whatever may have been its intended fashion.
MISCELLANEOUS TRICKS
MONEY-MAKING MADE EASY
Requirements. Coin mat loaded with two double pennies, shell
side undermost. Lighted candle and velvet mat (with pocket) on
table.
Presentation. Performer comes forward with coin mat hanging
down in his right hand (mouth of loaded space upwards), and asks
for the loan of a penny, marked in some conspicuous way. Receiving
it on the mat, he shows it, so placed, to the persons, seated on each
side of the owner, in so doing making it obvious to them, without
remark, that his hands are otherwise empty. Then returning to his
table, with the mat and the coin on it still in his hand, he delivers
patter to the following effect:
“Now I am going to show you a nice easy way of making money. I
was told when I was a small boy, ‘Take care of the pence, and the
pounds will take care of themselves.’ I believe they do. The pounds
take such good care of themselves that very few of them seem to
come my way. But you can make a bit even with pennies, if you
know how to set about it. All you need is a really good penny to
start with. It doesn’t matter how you get the penny. You may beg,
borrow, or steal it. Personally, I prefer to borrow it. If you try the
other two ways you get yourself disliked, but you can always get
people to lend you things, if you ask prettily; and I’ve always been
celebrated for my nice borrowing manner. You must all have noticed
that the gentleman lent me a penny without the slightest hesitation.
I daresay if I had asked him, he would have made it two-pence, or
even six-pence, if he had as much about him. In this case, however,
one penny is enough for my purpose; and here it is with the owner’s
own mark upon it. Observe that it is just a plain ordinary penny, and
you can see for yourselves that it is the only one I have—in my
hands, I mean. I am always truthful. As a matter of fact, I believe I
have another in my left trouser-pocket, but I promise you that I
won’t use it.”
Pass mat, with coin on it, from one hand to the other, showing the
hands otherwise empty, and leaving the mat finally in the right hand:
then let the marked coin slide off it into left hand, the concealed
coins passing with it. Put down the mat, and show all three coins
together (the marked coin in front) held between forefinger and
thumb, broadside toward the spectators. Thus held, they are, even
at a few feet distant, undistinguishable from a single coin.
“Now I am going to make money. Not much, perhaps, in fact only
a penny at a time. I shall start by making this one penny into two.
Cent per cent is not bad, is it? Observe, I use no violence. It’s all
done by kindness. I just warm the coin a little over this candle-
flame. That softens the metal and I am able to squeeze another
penny out of this one, so!”
Show as two accordingly, by sliding off the hindermost coin in its
shell, exhibiting it on both sides, and laying it on the table.
“You have all heard of turning an honest penny. Well, this is one
way of doing it. It is said, too, that one good turn deserves another,
so we’ll try again. I warm the first penny a little more, and again I
pull another out of it.” (Draw second double coin from behind the
original penny.) “Now we have three, two in my hands” (showing
one in each hand) “and one on the table.
“I think I heard somebody say that I couldn’t make any more? I
don’t like to do it, because the process takes a good deal out of the
original penny, and I might spoil it. On the other hand, I don’t like to
decline a challenge, so here goes! I warm these two again, and
then, with a little extra pressure, because it naturally becomes more
difficult each time, I get yet another penny, as you see. So now, in
all, we have four.” (Show those in hand as three, by drawing solid
coin out of shell, then, picking up double coin from mat, show as
four accordingly.) “Did I hear a lady say ‘Just one more’? Well, then,
one more.” (Develop the double coin just picked up, and show as
five.) “But here I must really draw the line. If I kept on like this,
there would be none of the original penny left. It is already getting
weaker and weaker. Besides, there wouldn’t be time for anything
else, and I have several still more wonderful things to show you.
“And now to put these extra pennies back again into the original
coin. At present it is only one-fifth its proper weight and if the owner
tried to pass it in this condition there would be trouble. I should
explain, by the way, that these others are not really solid coins:
though they look like it. They are what the spiritualists call astral
coins, if you know what that means: I don’t quite know myself; so I
won’t attempt to explain, but I believe in the Police Courts they are
known as ‘duffers.’”
Lay all five coins on the velvet mat, each of the shells slightly
overlapping the solid coin to which it belongs.
“Here we have one, two, three, four, five. I pick up two of them.”
(Draw shell over solid in act of picking up.) “I give them a gentle
squeeze and they become one only.” (Show as one, and replace on
mat behind the mouth of pocket.) “Now I treat two more in the
same way.” (Repeat accordingly, replacing these also, as one, on
mat.) “We have now only three left. Let me see, which is the
original? Ah! here it is, with the owner’s mark upon it.” (Pick it up
and show in left hand.) “Now I rub one of these others into it.”
(Make the movement of picking up one of the double coins, and of
rubbing it into the coin in left hand, but in reality “vanish” it, in the
supposed act of picking up, into the pocket of mat.) “And now I pass
this other one into it in the same way, and we have only the original
penny left. It is like the ten little niggers, isn’t it, only that they never
came back. Here is your penny, Sir. Please observe that it still has
your own mark upon it, which is proof positive that there has been
‘no deception.’”
N. B. If the performer is a novice, he may simplify the trick by
loading the coin mat with one double and one ordinary coin only, or
two ordinary coins, limiting the successive productions accordingly.
CULTURE EXTRAORDINARY
The root-idea of this item must be credited to Signor Antonio
Molini, the inventor of the very effective stage trick known as Le
Souper du Diable. The principle on which that trick is worked is so
subtle, and withal so simple, that it is surprising that it has not long
since been applied to the production of less bulky objects than the
tablecloth, eatables and drinkables which figure in the Satanic
supper. The following is an application of the Signor Molini’s idea on
a scale better adapted to the drawing room.
Requisites.
(1) Three zinc or zinc-lined tubes, as a, b, c, in Fig. 15, ranging in
height from about three inches upwards, and graduated in size so as
to fit easily one within the other.
Fig. 15
(2) Three balls, one red and two white, of such diameter as to
pass easily through the narrowest tube. Two smaller balls, one red
and one white, about half an inch in diameter.
(3) A box of matches.
Each of the two smaller tubes (c and d in diagram) to be loaded
with one of the larger white balls, suspended from the upper edge of
the tube by a wire hook, shaped as a in Fig. 16, connected with the
ball by a loop of fine silk or cotton thread. The red ball is vested, and
the two little balls may rest in a shallow tray or other appropriate
receptacle on the table, deep enough as to conceal them from the
view of the spectators.
Fig. 16
[8] Rummage.
Fig. 17
[9] The little dishes of paper pulp sold for picnic purposes will
be found to answer this and similar purposes excellently and have
the further advantage of being exceptionally portable.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebooknice.com