html Questions

Peter Mortensen   2018-05-29 01:16

Which “href” value should I use for JavaScript links, “#” or “javascript:void(0)”?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.? ...
Mathew MacLean   2018-05-30 10:43

Is it possible to apply CSS to half of a character?

What I am looking for: A way to style one HALF of a character. (In this case, half the letter being transparent) What I have currently searched for and tried (With no luck): Methods for styling ...
juan   2018-05-30 21:01

How can I know which radio button is selected via jQuery?

I have two radio buttons and want to post the value of the selected one. How can I get the value with jQuery? I can get all of them like this: $("form :radio") How do I know which one is selected?
Nathan Smith   2018-05-31 00:27

Change an element's class with JavaScript

How can I change a class of an HTML element in response to an onClick event using JavaScript?
Kristopher Johnson   2018-06-01 01:32

Storing Objects in HTML5 localStorage

I'd like to store a JavaScript object in HTML5 localStorage, but my object is apparently being converted to a string. I can store and retrieve primitive JavaScript types and arrays using localStorage,...
Robinicks   2018-06-02 08:11

Modify the URL without reloading the page

Is there any way I can modify the URL of the current page without reloading the page? I would like to access the portion before the # hash if possible. I only need to change the portion after the ...
turtledove   2018-06-03 14:02

Get the size of the screen, current web page and browser window

How can I get windowWidth, windowHeight, pageWidth, pageHeight, screenWidth, screenHeight, pageX, pageY, screenX, screenY which will work in all major browsers?
Monica Das   2018-06-04 03:21

Unable to scrape text from a div tag using Cheerio js node?

I am trying to learn about webscrapping and how to use cheerio.js for scrapping text from DOM elements. Now, here is my problem. I have a div tag inside which I have another div tag and then inside ...
KhaledHarbii   2018-06-04 03:43

How do I replace the line breaks in a textarea by a <br/>

I formed a textarea and a button that replaces the line breaks of this textarea with <br /> I used this JavaScript code: var gtcontbtnafterTA = document.getElementById("contbtnafterTA"); ...
Tamas Koos   2018-06-04 05:00

CSS grid - remove elements with jQuery so they don't take up space

So I have a css grid layout with "boxes" inside, that I filter with a text input and javascript. How can I hide the filtered out elements so that they don't even take up space within the grid (so the ...