Jump to content


  • Posts

  • Joined

  • Last visited

kodejuice's Achievements


Newbie (1/7)



  1. The first one could be called anywhere within the scope it is defined in, while the second can not.
  2. Do you mean enumerating the items in the window object, if so here is how. for(var k in window){ console.log(k '\n'); }
  3. You dont need arrays for such tasks, try this //using jQuery $(function(){ var total = 0; $("input[type=checkbox]").click(function(){ var disVal = $(this).val(); total += Number(disVal); alert(total); }); $(".resetButton").click(function(){ total = 0; //reset }); });
  4. Can someone become a web developer and a software developer, and be very good at both, I need replies please.
  5. Please i need to know what every web designer must know before he/she can say "I'm a web designer", i want to know if technologies like HTTP,PhotoShop,DNS are neccessary, Please i need to know
  6. Please can one briefly explain the use of this sign in javascript, and what is results to.I.e var d = 5;return d >> 1; //=> 10why is it '10'?
  7. Items returned by the prompt function are strings so you have to convert it to a number with the "Number" function.<script>function q(){ var a = Number( prompt("Enter value") ); var b = Number( prompt("Enter value") );document.getElementById("demo").innerHTML= a + b;};</script><button onclick="q()">Click on me</button><p id="demo"><p>
  8. Thanks alot, please can you recommend any algorithm/data structures book for a javascript programmer.
  9. i need to know if i would learn about algorithms and data strcutures in order to be called a JavaScript programmer/* Please i'm so so confused */
  10. I'm actually dealing with netscape and not IE
  11. Please how do i accomplish this, an equivalent to jquery .find function/*My Try*/function find(parent, child){ return document.querySelector(parent).querySelector(child);}<ul> <li>First</li></ul>find("ul","li"); //[object LI]//this works fine but, the support for "document.querySelector" is limited, i need and equivalent please.
  12. Please how do i get around with this - I need a function that waits for like 2 seconds before moving on to the next line./*My Attempt*/function waitFor(secs){ return setTimeout(function(){ //waiting...}, (secs||1000));}alert("code started");waitFor(2000);alert("code stopped");
  13. <section id="first"> <!-- use for Ajax --> <form method="get" action="" id="add1"> <fieldset>JS Code $(document).ready(function(){ $("section#first").show(); });
  14. Please i need help toggling between two functions, here is my attempt.<script> toggle = true; function toggleFunc(fn1, fn2){ if(toggle == true){ fn1.call(fn1); toggle = false; } else{ fn2.call(fn2); toggle = true; } }</script>This works perfect, but i can't have more than one "toggleFunc" function on a page.
  • Create New...