treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Stack

  • How to dynamically size a with jQuery?

    Let me try to get this straight. Lets say ur using a margin of 100px, you want each of the boxes and margins to be 100px in width? are these boxes supposed to be static or dynamic? because if they are static you wouldnt need jQuery just CSS using wi…
    Comment by Stack June 2009 permalink
  • Styling Input Field w/ JavaScript onfocus & onblur

    To get it to change from stars to text you would include these in your onfocus and onblur events: onfocus="this.type='password' onblur if(this.value==''){this.value='Enter your email...'; this.type='text'…
    Comment by Stack June 2009 permalink
  • File Uploader for Multiple Files or Entire Folder

    That cant be done with javascript. You would need a PHP or ASP script written to upload the files.
    Comment by Stack May 2009 permalink
  • jQuery toggleClass or addClass problem

    You wouldnt be changing the css at all. you would simply change the display value to none. it does not alter the css file in any way. simply set a display: none property to the element
    Comment by Stack May 2009 permalink
  • Key press adds class to element

    Ya i dunno y it posted that, i posted the right one above. been havin some problems with this forum for some reason lately. Anyways changed it to what it was supposed to be. Anyone else having the issue where u need to log in like 3 times in order t…
    Comment by Stack May 2009 permalink
  • Animation script not working in Chrome and Safari

    Can you post an example of the script so we can take a look at it? u got a ton of scripts linked on that page and dont feel like lookin through all of em :p
    Comment by Stack May 2009 permalink
  • How to display page content after javascript finishes.

    just put a absolutely positioned div at the top of the page (below head but above all content) and give it a width and height of the full page so it covers everything then give it a high z-index. then at the very end of your script select that div a…
    Comment by Stack May 2009 permalink
  • How to display page content after javascript finishes.

    Unless you have some 5000+ line script or a buttload of intervals or timeouts your script already does run before the page content is loaded. provided the script is in the head at least.
    Comment by Stack May 2009 permalink
  • Key press adds class to element

    this time usin event handlers. keyCode and which both return numbers saying which key you press. a-z is 65-90 for other keys go here http://www.aspdotnetfaq.com/Faq/What-is-the-list-of-KeyCodes-for-JavaScript-KeyDown-KeyPress-and-KeyUp-events.aspx. …
    Comment by Stack May 2009 permalink
  • Key press adds class to element

    a very valid point. next time ill be sure to spend a lil more than 30 seconds writting up a script before i post lol
    Comment by Stack May 2009 permalink
  • Maxlength textarea

    give this a shot. new RegExp('\\[' + tags[index] + '](.*?)\\[/' + tags[index] + ']||\[' + tags[index] + '\=(.*?)\](.*?)\\[/' + tags[index] + ']');
    Comment by Stack May 2009 permalink
  • JavaScript Array

    Im not 100% sure what your asking for but from what it sounds like your interested in extracting a substring. Test var news = new Array(); news[0] = \"Today a big thing happened that was really big, seriously big, I mean huge!\&quo…
    Comment by Stack May 2009 permalink
  • Javascript count-up timer [RESOLVED]

    You can do the whole thing with one function and slightly simpler, just dont try to think to much into it. Test var sec = 0; var min = 0; function stopwatch() { sec++; if (sec == 60) { sec = 0; min += 1; } totalTime = ((min
    Comment by Stack May 2009 permalink
  • Key press adds class to element

    The same with standard javascript. Dont really require more script than jQuery but figured i would write it up to help ya break it down to learn a bit more about how its done. (reduce timeout to make it change black again faster): Test var retur…
    Comment by Stack May 2009 permalink