www.webdeveloper.com
Results 1 to 4 of 4

Thread: simple jQuery not working....?!

  1. #1
    Join Date
    Mar 2010
    Posts
    281

    simple jQuery not working....?!

    This is some very simple jQuery but is not working, Can someone clue me in as to why this is not working?,

    The code is here,

    <script type="text/javaScript" src="js/jquery.min.js"></script>

    <script type="text/javaScript">

    function doIt() {
    alert('please work');
    $('body').append('<b>This is some appended text</b>');
    }

    doIt();

    </script>

    Firebug doesn't report any errors. To see the page, click below. Big thanks,

    http://www.tomcarden.net/bbbb_stagin...index_ts3.html

  2. #2
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    Your link isn't working.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  3. #3
    Join Date
    Jul 2003
    Location
    The City of Roses
    Posts
    2,503
    It's probably because you're trying to access the body element before the browser has parsed the body tag. You'll need to tell jQuery to wait for the DOM ready event before executing your code.

    Code:
    $(document).ready(function () {
        doIt();
    });
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  4. #4
    Join Date
    Mar 2010
    Posts
    281
    Yes!, thank you

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles