This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes jQuery silliness Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "jQuery silliness" Watch "jQuery silliness" New topic

jQuery silliness

Michael Matola
Ranch Hand

Joined: Mar 25, 2001
Posts: 1784
So I'm dinking around in the browser console trying to figure out something on a web page and think to myself how much easier it would be if this page had jQuery on it. So, I'm a programmer, right? I should be able to write a console script to add jQuery to whatever page I want! So I start. Hmm, I'll use $('<script></script>') to create the script element, then, let's see, attr() to set the type and point src to a jQuery file. Then I'll probably want to use appendTo() or something like that to add it to the head.

Then it dawns on me.

(I Googled and found a POJS snippet that does exactly what I want, so I'm all set. Just wanted to share my Friday morning moment.)
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63232


Seriously, it is amazing how, once you get used to having jQuery around, how lost one can feel without it.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Have you checked out Aspose?
subject: jQuery silliness
It's not a secret anymore!