How do I turn a repetitive string into a function?

At the moment I'm getting information from an API - I want to convert that information onto my site in a more user friendly way to see. The issue here is that the amount of the variable that I'm looking for keeps changing along with the answers in it...
more »

2017-12-03 23:12 (1) Answers

Javascript autocloses HTML tags?

Why do these two functions give different results? var table1 = document.getElementById("table1"); var table2 = document.getElementById("table2"); var register = [ {att1: 1, att2: 2, att3: 3}, {att1: 4, att2: 5, att3: 6}, {att1: 7, ...
more »

2017-12-03 19:12 (2) Answers

Two element's background-color within a nav

I need to add an effect of two elements within a div. I tried selecting their id(and also some other way) but is not working as expected. Maybe I am unsuccessful because of my not having deep knowledge of HTML/CSS. Here is a sample of what I tried r...
more »

2017-12-03 15:12 (3) Answers

How to show content by scrolling down?

I have written some html code for my webpage in which multiple images are shown. the problem is, all the images are loaded at the starting itself. I want to change that to show extra images by scrolling down. How to do that with jQuery? The code is:...
more »

2017-12-03 13:12 (3) Answers

How to stick the header area at the top of page?

This is my header area section of my template. i want to stick the menu bar and logo at the top. I tried a lot for all most 4 days.But i couldn't.I use sticky.js plugin.But it wouldn't happen.What's wrong with my code?I couldn't understand.I use para...
more »

2017-12-03 07:12 (2) Answers

How to get button below div

I've been trying to get this button below the div, but I have no idea what went wrong. The button is supposed to be centered right below the page. I've tried modifying the z-index, changing the CSS so that the button to inline-block, putting the bl...
more »

2017-12-03 05:12 (1) Answers

how to parse html text file in terminal?

I have a text file that even after removing all the html tags still contains some html codes of apostrophes and other punctuations example : It's // It's my question is how to change all of them? and I'm using a bash script under li...
more »

2017-12-02 22:12 (2) Answers

including font face for bold not working

I've added the 'circular' font family to my site shown in the first code snippet below, but it doesn't add any bold, so I tried to include the bold .ttf and .woff for the bold 'circular' font but neither of my two approaches worked, the first approa...
more »

2017-12-02 21:12 (2) Answers

Clickable link on specific area of an image

I have an image of a map It has specific area names on the map but it is all just a PNG image. I would like the user to be able to click a name on the map and be taken to a specific board. For example, the map has three names on it. Each name is at ...
more »

2017-12-02 18:12 (1) Answers

Find specific color in image

I have an image like this: and like to find a specific color in the image (#ffa400 / #ffffff) and get their percentage occurrence value (orange maybe: 75%, white: 25%) NOTE: Keep in mind that I don't like to get the average color (in this case...
more »

2017-12-02 15:12 (1) Answers

Django image form isn't saving the image

I have a form that involves uploading a profile picture. I have it working so that I can upload images in the /admin/ interface and display them correctly, but I cannot get my Modelform to save the image. Here is what I have: class Cand...
more »

2017-12-02 10:12 (1) Answers

Using Local Storage on For-Loop

I'm new to JavaScript and i'm trying to create a code where for each checkbox item checked, a point is added to the id=result THEN the result is saved in local storage. Problem is, it won't save the generated result. <script> function score()...
more »

2017-12-02 08:12 (1) Answers

js - duplicate all child nodes

I want to duplicate all child nodes in a container, and insert them in the same container. For example, I have: <div id="container"> <div class="square red"></div> <div class="square green"></div> </div> An...
more »

2017-12-01 22:12 (1) Answers

Background video comparison on mouse position

I'm trying to make a video comparison header for a site I'm building. I have two videos on top of one another, and I'm trying to create a comparison slider effect where the top layer reveals the bottom on mouse position. Fiddle/code below, any help...
more »

2017-12-01 13:12 (2) Answers

HTML tag textual content replaced by icon

I'm working since years with iconic fonts like font-awesome. Until now, when I need to add an heart icon on a web page, I use this html syntax <i class="fa-heart"></i> Technically, it uses the pseudo-element :before and link the class...
more »

2017-12-01 12:12 (2) Answers

Email Template Link Color wont change

I have an email template in Jade which contains "links", or basically strings of text with .com such as They are not actually enclosed in anchor tags, however when the email is sent, they appear as links. I have tried styling the font, ...
more »

2017-12-01 09:12 (4) Answers

CSS change animation duration without jumping

I have a simple animation of a wheel spinning. I am trying to control the speed of the spinning wheel using a slider (input range). I have managed to do this, but every time I change the animation the animation restarts (it jumps). Looking for a solu...
more »

2017-11-30 17:11 (4) Answers