weinre:
https://people.apache.org/~pmuellr/weinre/docs/latest/Home.html
Chrome remote debugging:
https://developers.google.com/web/tools/chrome-devtools/remote-debugging/
Sunday, April 28, 2019
Thursday, April 18, 2019
JQuery: How to create element and set event listener at same time
Example:
Creates a div and adds click event listener.
Reference:
var cell = $('<div>').on('click', function() {
$('#navigator')[0].bringPageTop('gallery.html', {
data: { pokenumber, savedPokemon }
});
})[0];
Creates a div and adds click event listener.
Reference:
CSS: What are viewport units vw
An example:
Reference:
Viewport Width (vw) – A percentage of the full viewport width. 10vw will resolve to 10% of the current viewport width, or 48px on a phone that is 480px wide. The difference between % and vw is most similar to the difference between em and rem. A % length is relative to local context (containing element) width, while a vw length is relative to the full width of the browser window.
https://css-tricks.com/fun-viewport-units/
#grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-auto-rows: 33vw;
}
Reference:
Viewport Width (vw) – A percentage of the full viewport width. 10vw will resolve to 10% of the current viewport width, or 48px on a phone that is 480px wide. The difference between % and vw is most similar to the difference between em and rem. A % length is relative to local context (containing element) width, while a vw length is relative to the full width of the browser window.
https://css-tricks.com/fun-viewport-units/
Wednesday, April 17, 2019
CSS: How to specify a child div
Example:
.grid-container > div {
background-color: rgba(255, 128, 255, 0.8);
text-align: center;
padding: 20px 0;
font-size: 30px;
}
References:
https://www.w3schools.com/cssref/tryit.asp?filename=trycss_grid-template-columns2
.grid-container > div {
background-color: rgba(255, 128, 255, 0.8);
text-align: center;
padding: 20px 0;
font-size: 30px;
}
References:
https://www.w3schools.com/cssref/tryit.asp?filename=trycss_grid-template-columns2
Jquery: how to create an element and set attribute at the same time
Example:
or
Reference:
https://stackoverflow.com/questions/22886101/jquery-create-a-new-element-with-data-html-attribute
var image = $('<img>', { src: `img/${pokenumber}.png` })[0];
or
var image = $('<img>').attr('src', `img/${pokenumber}.png`)[0];
Reference:
https://stackoverflow.com/questions/22886101/jquery-create-a-new-element-with-data-html-attribute
Subscribe to:
Posts (Atom)