George John has Published 1081 Articles

Getting Tooltips for mobile browsers in HTML

George John

George John

Updated on 25-Jun-2020 06:22:05

1K+ Views

When you will click on an element with a title attribute, a child element with title text is appended. Let us see an example −For HTML −    The underlined character. jQuery −$("span[title]").click(function () {    var $title = $(this).find(".title");    if (!$title.length) {       $(this).append('' + $(this).attr("title") ... Read More

Use CSS width property for responsive image

George John

George John

Updated on 25-Jun-2020 06:09:28

123 Views

Set the width property to 100% for the responsive image. You can try to run the following code to make your image responsiveExampleLive Demo                                 img {                width: 100%;                height: auto;             }                         To check the effect, you need to resize the browser.          

Is there a Microsoft equivalent for HTML5 Server-Sent Events?

George John

George John

Updated on 25-Jun-2020 05:59:49

129 Views

To achieve your goal for HTML5 Server-Sent Events −Try polyfillIt would work for IE10 and IE11 as well. It starts with −if ("EventSource" in global) return;It only runs in web browsers that do not support EventSource.Refer the following GitTry websockets Works for IE10 and IE 11 and it also provides bi-directional ... Read More

How to actually work with HTML5 Canvas camera/viewport?

George John

George John

Updated on 25-Jun-2020 05:54:06

740 Views

For viewport usage, use the drawImage() method.ctx.clearRect(0, 0, game.width, game.height); // a full background image ctx.drawImage(background, cropLeft, cropTop, cropWidth, cropHeight, 0, 0, viewWidth, viewHeight);For the game −var myGame = document.getElementById("game"); var myCtx= myGame.getContext("2d"); myCtx.clearRect(0, 0, game.width, game.height); // using drawImage() method myCtx.drawImage(background, left, top, 350, 250, 0, 0, 250, ... Read More

Usage of CSS align-content property space-between value

George John

George John

Updated on 24-Jun-2020 15:59:06

134 Views

Use the align-content property with value space-between to add space between the flex lines.You can try to run the following code to implement the space-between valueExampleLive Demo                    .mycontainer {             display: flex;       ... Read More

Shorthand CSS property for flex-direction and flex-wrap

George John

George John

Updated on 24-Jun-2020 15:38:04

237 Views

Use the flex-flow property to set the flex-direction and flex-wrap property in a single property. You can try to run the following code to implement the flex-flow propertyExampleLive Demo                    .mycontainer {             display: flex;   ... Read More

Usage of CSS align-content property center value

George John

George John

Updated on 24-Jun-2020 14:59:10

176 Views

Use the align-content property with value center to set the flex lines to the center.You can try to run the following code to implement the center valueExampleLive Demo                    .mycontainer {             display: flex;   ... Read More

CSS flex container properties

George John

George John

Updated on 24-Jun-2020 14:28:15

191 Views

The following are the CSS flex container properties flex-direction flex-wrap flex-flow justify-content align-items align-content

What is the MySQL VARCHAR max size?

George John

George John

Updated on 24-Jun-2020 14:15:23

5K+ Views

The MySQL version before 5.0.3 was capable of storing 255 characters but from the version 5.0.3 , it is capable of storing 65, 535 characters.MySQL official documentation states −The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65, 535 bytes, ... Read More

Difference between Schema and Database in MySQL?

George John

George John

Updated on 24-Jun-2020 14:07:57

5K+ Views

In MySQL, schema is synonymous with database. As the query is written to create the database, similarly the query can be written to create the schema.Logical structure can be used by the schema to store data while memory component can be used by the database to store data. Also, a ... Read More

Advertisements