Posts by ropbla9 • 6,810 points
85 posts
-
2
votes2
answers559
viewsQ: How to remove and add a class in a SINGLE event?
Look at function rodarslider(){ (...) caption.classList.remove('sliderfect'); caption.classList.add('sliderfect'); (...) } The above function is the little chunk of the algorithm of a pure JS slider…
-
6
votes1
answer412
viewsQ: How to make dynamic animations with CSS3?
I know how to make animations with Transition, Rotate + :Hover or triggering class change with JS. But what if I want a CSS3 animation that when rendered it does more than one move without being…
-
3
votes1
answer236
viewsQ: How to create a modular function whose parameter is an operator?
Suppose I want to create a function that changes the src of an image by another in the index of an array, thus: var arrayimgs = ["js/img1.jpg","js/img2.jpg","js/img3.jpg"]; var imagem =…
-
23
votes2
answers2433
viewsQ: What is Javascript Prototype?
I see in various instances of native objects a '.protoype' in the middle before a method or attribute but I don’t know what they are EXACTLY. The only thing I know is that it’s Javascript’s way of…
-
2
votes2
answers193
viewsQ: When to use Em or %?
I’m studying responsive layout and already know that to create a flexible part it is necessary to use relative measure like Em and %. But I still can’t understand what the real difference between…
-
1
votes2
answers566
viewsQ: Jquery or pure JS + CSS3?
The CSS3 gained so many utilities that before were only possible with programming, for example: Media queries, fb, keyframe, Transition etc... So what are the advantages, disadvantages and when…
-
2
votes2
answers2403
viewsA: Position a section of the layout below a FIXED header
The ideal is to use margin-top and not position + coordenada because the position should influence the size of the section post header. If not everything that comes after the first header section…
-
2
votes2
answers2403
viewsQ: Position a section of the layout below a FIXED header
-> I have a layout whose header is fixed at the top. -> Only that the Section just below is below it and does not follow the same flow(normal) In this case what is the best way to make the…
-
2
votes3
answers108
viewsQ: Vertical-align does not align <li>’s
Guys, I have a problem using vertical align. Mine <li> from the initial menu is 80px high and set to be aligned in half. Only it does not work, Ué. http://jsfiddle.net/rhbogwx7/…
-
0
votes1
answer1035
viewsQ: When to use PX or % in positions?
On internal layout elements, to position in margin or coordinate, when to use PX and %?
-
36
votes4
answers58476
viewsQ: IF, ELSE IF, ELSE or IF IF IF. When to use, what’s the difference?
It’s a very basic question, but it intrigues me a lot. See the code below: var bola = "redonda"; if(bola == "comestivel") return comer(); if(bola == "liquida") return beber(); if(bola == "redonda")…
-
3
votes2
answers1144
viewsQ: Is JSON equal to an Associative array?
Are the two the same thing? Or is JSON a more complex library or technique?
-
0
votes1
answer333
viewsQ: How to style the general scroll bar of the site?
I was looking at some templates online and I was curious about this one. His scroll bar is not part of the browser so I see it but the DOM. How is that?…
-
57
votes2
answers3691
viewsQ: What is DOM, Render Tree and Node?
I’m a beginner in JS and try to understand the theory, but all the articles I find on DOM are too "scientific". There wouldn’t be a simpler way to explain this to a "layman"?
-
17
votes2
answers2365
viewsQ: Are JS native objects associative arrays?
And the arrays are like native objects of JS? What about literal strings/primitive data? What I understand is that they are instances of the object string, but with the difference of being arrays…
-
10
votes1
answer1444
viewsQ: What is an Array-Like?
A given string is an array-like, whereas a given number is not. Its respective objects are array-Likes (the objects themselves), right? A declared object, a DOM object is also an arraylike, correct?…
-
0
votes1
answer145
viewsQ: Initial condition (IF) does not work
I’m trying to make an old game. So far I managed to make the appointments change every turn and the function to delete the appointments. ps: I’m using black and red color instead of ball and "x". My…
-
5
votes3
answers10282
viewsQ: How to navigate a children and a div with Javascript?
I need a function that goes through #paicasas and leaves the background of all children "casa1,casa2...". I tried to do it but I know it’s far from right. function apagar(){ for(var i in…
-
3
votes1
answer1380
viewsQ: Click on an element that triggers the click on another
I have 5 images on my Slide <li><img src="images/slide3.jpg" alt=""></li> <li><img src="images/slide2.jpg" alt=""></li> <li><img src="images/slide5.jpg"…
-
1
votes1
answer442
viewsQ: Form validation with index()
I know you can validate with HTML5 or CSS, but just out of curiosity: I found a code on the net that checks if the syntax of a typed email is correct: if(document.dados.email.value=="" ||…
-
1
votes1
answer685
viewsQ: Inline-block element drops when filled
I have 3 elements inline-block. Are 3 squares aligned, summarizing. So when I put one div "daughter" in one of them, he falls and the other empties stay in position. It happens the same with all.…
-
5
votes1
answer1368
viewsQ: When to use vertical-align?
I am aware that in certain cases it is advisable to use this property instead of text-align , margin or position. But I don’t know why or how vertical-align. Besides, how do you use this property?…
-
2
votes1
answer473
viewsQ: I can’t solve a goal using ":Hover". What to do?
I’m doing an institutional website and it’s a kind of web-design agency, only it’s more to learn. Then at HOME I made several little blocks with links to the service pages. And in each block my…
-
49
votes2
answers40509
viewsQ: When to use Absolute or relative position in CSS?
I know an element inside with position absolute does not respect the boundaries of the parent div and that relative respects, and theoretically positions itself in relation to itself. My doubts are…
-
7
votes1
answer867
viewsQ: Element moves out of place in "out-zoom"
On this website, the menu is a ul inline, is inside the div with indefinite dark-colored width. In ul placed margin-left to align with the blocks below... It turns out that at another resolution or…
-
13
votes1
answer462
viewsQ: Operator NOT (!)
Guys, I’m kind of not knowing how exactly the operator works (!). I always get confused when it comes to using it because I don’t really know how to apply it. It only works with parameters equal to…
javascriptasked ropbla9 6,810 -
2
votes1
answer334
viewsQ: last item of the <li> list is not down even if you have space
I’m making a very simple site in HTML5 and pure CSS So I created an inline-block list of 4 items and each item is a large square whose sizes have to align to the header and such. The problem is that…
-
1
votes1
answer111
viewsQ: Where am I going with this crap game?
I played this game of craps just to exercise http://jsfiddle.net/b02abznm/ (if possible open in Dreamweaver or another similar editor, which in Jsfiddle complicates) The only problem is that I can…
-
9
votes1
answer383
viewsQ: What are classes, how do you use them, and in Javascript?
I started studying programming and Javascript 3 months ago, but so far only in technique. However I realized that it makes it very easy to understand the concept of object orientation. I already…
-
7
votes4
answers28233
viewsQ: How to know the highest value of an Array?
I am making 1 calculator that adds values typed by the user and when the values of sums arrive in 1000 or exceed, the loop ends. So far so good, the problem is to be able to identify the largest…
-
8
votes3
answers1135
viewsQ: How to make the first two numbers of a sequence Math.Andom are NOT EQUAL
I made a lottery system in order to learn, I will not post the entire code here just the part I’m stuck. The PC draw is a sequence of 6 numbers that I present in the DOM (that doesn’t matter), so I…
-
1
votes2
answers1167
viewsQ: How to generate Math.Run from a value other than 0?
Hey guys, I just got to know the Math.Andom method and I already know how to generate values from 0 to another number through multiplication, e.g.: Math.Random()*20. But I’m wondering how I can do…
-
3
votes1
answer3473
viewsQ: Text translation algorithm
I’m a beginner in JS I’ve studied up to the part of loops, then I stopped to review everything I saw and do some exercises. I made an algorithm that translates to English, Spanish and Portuguese a…
-
4
votes8
answers481
viewsQ: I can’t learn syntax for
I can learn subjectively for a few seconds, but I can’t fix it no matter how hard I try. I’ve already repeated classes, I’ve done exercises and everything, but the syntax and its variations just…
-
2
votes1
answer111
viewsQ: How to identify the type of data the user typed in a prompt or input?
I started studying JS 3 weeks ago and am well apprenticed... My biggest current duplicitous is that I don’t know an operator or command to identify and condition the value of the data type entered…