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

event.preventDefault() and redirect asp mvc/jQuery

What am trying to do is to post on form submit to a action and catch response and that works fine.Problem is when RedirectToAction gets called, it just stays on that same view(it doesn't redirect),or in case model is not valid, it doesn't show model ...
more »

2017-12-03 14:12 (1) 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

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

Find specific color passage / spectra in image

I have an image like the example below... ---> RESULT: #ffdf00 => something like 30% ... and I'd like to find the occurrence (percentage) of a specific color in the image (e.g. #ffdf00 - yellow), or even better I'd like to find the occurrence (pe...
more »

2017-12-02 13:12 (0) Answers

Calling ajax consecutive does not work

I Have an ajax method, which I use to change the status of an object. Each status can change by clicking on that element at any time. The problem is that after loading the page for the first time, It works properly. But When I click again, if does ...
more »

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

Passing JSON object into a list

I am new to programming and have a json object with data related to a coin. I want to take the data from the json object and display it using google charts. However I can't seem to be able to get it working. Any input is appreciated. Json object ...
more »

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

Restructure complex nested array

I have an array like this: var my_array= [ [2, [[9, 10]]], [5, [[10, 11]]], [4, [[11, 9]]], [1, [[19, 2], [41, 10]]], [7, [[17, 3]]], [0, [[11, 4], [18, 5]]] ] The arrays in my_array includes another two arrays (the first i...
more »

2017-12-01 18:12 (3) Answers

Multiple event listeners?

I have the below code setup to use both 'change' and 'input' event listeners on my variable seekbar. As you can see they are exact duplicates, so I'm wondering how to merge the 2 event listeners into a single function? // Event listener for the see...
more »

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

.eq() out of order

I'm trying to select the 3rd element of a JQuery object, by using eq() method. But for some reason the 2nd and 3rd selections pop out in changed order: var selection = $("[name=input0], [name=input1], [name=input2], [name=input3]"); selection.eq(1);...
more »

2017-12-01 13:12 (2) 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

How to change text in a simple expand jQuery?

How can I change the text of [+ Add] when I click on expand and show this [X Cancel] But to get to the idea, what I want to achieve is what I show in the next two images. $(function() { $('.expand-one').click(function(){ $('.content-o...
more »

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

Select2 dropdown on disabled mode

I have the following issue: Fiddle Link <select id="select2" style="width:250px"> <option value=""></option> <option value="option 1">Option 1</option> <option value="option 2">Option 2</option> <...
more »

2017-11-30 20:11 (1) 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

Horizontal images Slide up

I'm trying to load this 5 images in a way that when the first image slide up, the second one which is slightly slower, slides next(right side) to the first one, and the third next to the second one and so on. The problem is they all slide up the sa...
more »

2017-11-30 03:11 (1) Answers

Capturing href and prevent event default

Not sure why the code is not working. The javascript is not printing the alert box nor preventing the event default. I was under the assumption that the data would load asynchronously keeping me on the same page. <!DOCTYPE html> <html> ...
more »

2017-11-29 17:11 (2) Answers

Modal event before hide

I have a problem. I need to show toastr informing that changes are not saved when someone wants to hide modal. I need to trigger toastr before modal hide, and when the user tries again to dismiss modal allow this. I tried something like this: decla...
more »

2017-11-29 14:11 (1) Answers

Canvas image leaves weird trail when moving left

I have an HTML5 Canvas where I need to move 2 copies of main object to right and left. Right side seems to be working fine, but left one starts to leave weird greenish trail. jSfiddle link here Here is the code. Assignment requires me to write word ...
more »

2017-11-29 14:11 (2) Answers