Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. Padonak

    JavaScript What are the books to become a full-stack JS developer?

    What movie is enough to watch to become Bruce Lee?
  2. Padonak

    JavaScript Navigate images with javascript

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet"...
  3. Padonak

    JavaScript return element from array with multiple conditions

    const boilers = [ {CW:1, ww_cap: 0, h_cap: 12, boiler_costs: 2200}, {CW:2, ww_cap: 0, h_cap: 15, boiler_costs: 2400}, {CW:3, ww_cap: 18, h_cap: 20, boiler_costs: 2600}, {CW:4, ww_cap: 22, h_cap: 24, boiler_costs: 2800}, {CW:5, ww_cap: 28, h_cap: 32...
  4. Padonak

    JavaScript Javascript API trouble

    I swear I really am ))) JS is a hobby
  5. Padonak

    JavaScript Javascript API trouble

    Those selectors can be very useful when you need to select a certain collection from DOM. document.querySelectorAll('[class*=Links] a') selects all the anchors within these two divs: <div class="postLinks">Post links:</div> <div class="mediaLinks">Media links:</div> No, that was the matter of...
  6. Padonak

    JavaScript Javascript API trouble

    Hi there, cbreemer ) [attribute *= str] selects every element having str at any position. [attr] – attr defined, [attr="val"] – attr equals to val, [attr^="val"] – attr starts with val, for example "value", [attr|="val"] – attr equals to val OR starts with val, [attr*="val"] – attr contains...
  7. Padonak

    JavaScript Javascript API trouble

    Not sure I understand right what OP wants to achieve, but hope this might be useful: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0">...
  8. Padonak

    JavaScript School project

    Hope this will help. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>To-Do List App</title> <style> body{ text-align: center; } #list{ padding: 10px 10px; border: 1px dashed #ccc; min-width: 200px; max-width: 500px; display: inline-block; color: #045; } #list div, [type=button]{...
  9. Padonak

    JavaScript scripts installed on account

    May be this will help
  10. Padonak

    JavaScript JS is not executing one line of code

    Anish, what if you declare the var this way: const search_wrapper_second = document.querySelectorAll(".search_input")[1]; Try this example: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Ttl</title> <style> div{ min-height: 30px...
  11. Padonak

    JavaScript How To Make a GIF Move with Arrow Keys?

    document.body.addEventListener('keydown', (e) => { const k = e.which || e.keyCode; if( ![37, 38, 39, 40].includes(k) ) return; const L = pic.offsetLeft + pic.scrollLeft, T = pic.offsetTop + pic.scrollTop, o = !(k % 2) ? k == 38 ...
  12. Padonak

    JavaScript How To Make a GIF Move with Arrow Keys?

    Try using one div with various backgrounds instead: <!doctype html> <html lang="en"> <head> <title>The Forest of Forgotten Souls</title> <base href="https://cyberstatic.net/images/smilies/"> <style> #player{ width: 40px; height: 40px; border: 1px solid...
  13. Padonak

    JavaScript Apparently 3 >= 2789

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title></title> <style> body, input{text-align: center;} </style> </head> <body> <input id="TheScrubber" value="0" max="2789"> <script> const scr = document.getElementById('TheScrubber')...
  14. Padonak

    JavaScript How to select area value from geojson using javascript

    Not sure I understand what exactly the OP needs to achieve (not that good in English, you know 👽), but here is my two cents: const data1 = { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "EPSG:27700" } }, "features": [ { "type": "Feature"...
  15. Padonak

    Fun activity Say hello... in a coding language!

    console.log( `${Object.entries({'Hello': ' Quonit'}).join(',')}! ;)` );
  16. Padonak

    JavaScript What is JavaScript?

    A kind of dope
  17. Padonak

    JavaScript How to code Locale Storage in JS

    // START OF CYNTHS JS BUDGET CODE const stored = localStorage.cynthsBudget?.split('|') || ''; if(stored){ $('form [id]').each( function(index){$(this).val( stored[index] )} ); /* adding reset button */ $('button').after('&nbsp;&nbsp;<button class="btn btn-primary btn-lg btn-block...
  18. Padonak

    JavaScript Sorting Arrays

    const arr = ["item1" , "item2" , "item3" , "item4" , "item5" , "item6" , "item7" , "item8"], order = [3, 2, 4, 0, 1], reodered = arr.map( (n, i, ar) => i < order.length ? ar[ order[i] ] : n ); console.log( reodered ); // ['item4', 'item3', 'item5', 'item1', 'item2'...
  19. Padonak

    JavaScript Getting the sum of equal array elements, and creating a new array

    const nameArray = ['Jack', 'Jack', 'Jack', 'Betty', 'Tim', 'John', 'John', 'Jack', 'Jack'], numberArray = [2, 3, 7, 3, 5, 6, 1, 4, 5]; let res = []; nameArray.forEach( (n, i, ar) => n != ar[ i - 1 ] ? res.push(...
Back
Top Bottom