Web browsers, home computer use: setting the cursor in the search bar w/o using the mouse

Self-tutoring about home computer use: the tutor shares a keyboard shortcut to the search bar.

is meant to return the cursor to the search bar.




Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Chrome: Developer tools (view page source): ==$0

The tutor talks about ==$zer0 in Chrome’s Developer tools.

Looking at a page source in Google Chrome, I saw the entry ==$0. It wasn’t manifesting on the page itself; I wondered if it was a type of HTML comment.

Apparently, ==$0 shows the element you’ve selected to inspect. Chrome itself prints it in the page source to help you find the line that produces the element you’ve chosen. It’s not content.



Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Web design: jQuery css() and JavaScript style: boundary testing

The tutor discusses what he noticed while experimenting with jQuery css() and JavaScript style.

JavaScript has a style function that allows you to access style attributes of an element. For example, to get an element’s color:

var e1_color=document.getElementById(“e1”).style.color;

However, as I understand, you’re not meant to harvest the entire style at once:

var e1_style=document.getElementById(“e1”).style; //not intended

Furthermore, let’s imagine you do so anyway, then try to convey that style to another element:

var e1_style=document.getElementById(“e1”).style;
//won’t work, according to my tests

Curiously, though, I’ve found that

var e1_style=document.getElementById(“e1”).style;

does work on Chrome and Firefox (but not ie11).

It’s not a recommended way to change the style of an element, but it hints at how JavaScript and jQuery can have deeper communication than JavaScript with itself. It also reminds of the potential differences from browser to browser.

I’ll be talking more about JavaScript and jQuery in future posts:)



Pollock, John. jQuery: A Beginner’s Guide. Toronto: McGraw-Hill, 2014.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.