www.webdeveloper.com

Search:

Type: Posts; User: markle976

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Ok. This should work: var myColors =...

    Ok. This should work:



    var myColors = ["#000000", "#FF0000", "#0000FF"];

    var getColor = function(){

    var index = Math.floor(Math.random()*3);
    var col = myColors[index];
  2. It might have to do with your css. It work's fine...

    It might have to do with your css. It work's fine for me in Safari. But, I had to set an initial border color. Here is a link to the jsFiddle I am using for playing with your code:...
  3. This is your problem: int i =...

    This is your problem:

    int i = (int)(Math.random() * 4);

    It should be:

    var i = Math.floor(Math.random()*4);

    You should also avoid using setInterval(). Here is how I would rewrite this code...
  4. Happy to help!

    Happy to help!
  5. I don't have much experience with mootools, but...

    I don't have much experience with mootools, but it looks like the problem is that both jQuery and mootools are using the $ sign. In jQuery you the $ sign is just a shortcut to the word jQuery, so you...
  6. Replies
    8
    Views
    1,372

    Here is the code cleaned up and commented: ...

    Here is the code cleaned up and commented:



    // create a html div element in "memory" and save it to a variable named newdiv
    var newdiv = document.createElement('div');

    // add a style...
  7. Replies
    14
    Views
    4,146

    Glad to help!

    Glad to help!
  8. Replies
    14
    Views
    4,146

    Here is an html page with a div that expands by...

    Here is an html page with a div that expands by 1px each time the increaseProgress function is called.
    It is currently being called on the onclick event of the a tag.



    <!DOCTYPE HTML>
    <html...
  9. Replies
    4
    Views
    4,027

    jQuery A switch statement is like an if statement with...

    A switch statement is like an if statement with multiple options. I don't know the exact key codes, but it would look something like this:



    var key = (e.keyCode) ? e.keyCode : e.which;...
  10. Replies
    4
    Views
    4,027

    jQuery This should work: // press key function...

    This should work:




    // press key function
    $(window).keydown(function(e) {
    key = (e.keyCode) ? e.keyCode : e.which;
    //add switch block for different keys
    ...
  11. Replies
    14
    Views
    4,146

    This may be a bit late, but here is a solution...

    This may be a bit late, but here is a solution using a closure:



    <a href="#" onclick="bar(); return false;">BUTTON</a>
    <div id="progressPercent">0</div>
    <script>
    var bar = (function ()...
  12. Replies
    4
    Views
    2,468

    The problem has to do with event bubbling. As...

    The problem has to do with event bubbling. As soon as you mouseOver the text and it is replaced with an input element it triggers the mouseOut event. Unfortunately, you will not get very far using...
  13. Replies
    1
    Views
    912

    console.logging elname (first loop through) I get...

    console.logging elname (first loop through) I get "id-0-r-0-0". Looking at the html the first div has an id of "id-0-r-0-1". I removed the first ii++ and it seems to fix the error, but there are...
  14. It definitely sounds like you will need a higher...

    It definitely sounds like you will need a higher level animation framework than jQuery core can provide. I recommend jQuery UI - it's not bad if you only download the parts you need. If you want to...
  15. No need to be rash. :) The other thought is to...

    No need to be rash. :)

    The other thought is to use bind() to add hover events; increment a counter on hover, unbind() when you get to two, and setTimeout() to re-bind after enough time has passed....
  16. hmm... You may need to try jQuery UI. I don't...

    hmm...
    You may need to try jQuery UI. I don't have quite as much experience with it, but I think it may have what you need. The switchClass() function specifically comes to mind.

    Sorry, I can't...
  17. how about this: $(document).ready(function...

    how about this:



    $(document).ready(function () {

    $('.hoverDisplayItemContainer').hover(
    function() {

    var animating = false;
  18. this ought to do the trick: ...

    this ought to do the trick:



    $(document).ready(function () {

    $('.hoverDisplayItemContainer').hover(
    function () {
    if($('#'+this.id+"desc").is(':animated')){
    return false;
  19. Glad to help!

    Glad to help!
  20. Here is the entire page: ...

    Here is the entire page:


    <!DOCTYPE HTML>
    <html lang="en">
    <head>
    <meta charset="utf-8" />
    <title>title</title>
    <script type="text/javascript">
  21. Oh yeah... Use the altered script below, and then...

    Oh yeah... Use the altered script below, and then add onload="startItUp()" to your opening body tag.



    function startItUp() {

    var resultsBox = document.getElementById('resultsBox');
    ...
  22. I think this will do what you are looking for: ...

    I think this will do what you are looking for:



    var count = 0;

    // this could be somwthing like: var emails = [<?php echo implode(',', $email_array);?>];
    var emails = ['a@email.com',...
  23. Replies
    4
    Views
    3,397

    happy to help!

    happy to help!
  24. Replies
    4
    Views
    3,397

    It depends what system you are on, and what kind...

    It depends what system you are on, and what kind of code you are writing.
    I used Dreamweaver for many years, but got frustrated with CS4 (on mac), and started to look at other editors.

    If you...
  25. Replies
    11
    Views
    5,256

    Glad to help!

    Glad to help!
Results 1 to 25 of 66
Page 1 of 3 1 2 3
HTML5 Development Center



Recent Articles