Results 1 to 4 of 4

Thread: Someone PLEASE help me with jQuery

  1. #1
    Join Date
    Mar 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Someone PLEASE help me with jQuery

    Hey

    I'm having a real pain getting someone to help me with this. I've never used javascript before and I dont know how or what to do.

    Basically, I have a a table and in the last column of each row, I want something like view all, and on clicking that view all, a new row will slide down underneath it and show some more details, I want that row to be the full width of the table (also stuck on that), but I have no idea how to apply jquery to that table, can anyone help?

    This is the effect I want: http://docs.jquery.com/Effects/slideDown#speedcallback

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    As far as I can see, that effect is for divisions, not table elements.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Feb 2008
    Location
    Coventry
    Posts
    103
    Thanks
    5
    Thanked 8 Times in 8 Posts

    Default

    Yeah just as js said, its not used for tables. I sort of have that same effect on my site(this site is just an absolute mess around of testing CSS, JQuery & AJAX). Massive work to do on it and im working on it, so if it goes down then just keep refreshing.
    See the hide image tag...that might be what u want, only it wont be shown by default for you.
    Code:
    function showhide(targetID) {
    //change target element mode
    				var elementmode = document.getElementById(targetID).style;
    				elementmode.display = (!elementmode.display) ? 'none' : '';
    			}
    			function changetext(changee,oldText,newText) {
    				//changes text in source element
    				var elementToChange = document.getElementById(changee);
    				elementToChange.innerHTML = (elementToChange.innerHTML == oldText) ? newText : oldText;
    			}
    			function workforchange(targetID,sourceID,oldContent,newContent) {
    				showhide(targetID);
    				changetext(sourceID,oldContent,newContent);
    			}

  4. #4
    Join Date
    Feb 2008
    Location
    Coventry
    Posts
    103
    Thanks
    5
    Thanked 8 Times in 8 Posts

    Default

    oops sorry code is all over the place, pressed tab and enter by mistake.
    Code:
    //goes in head tag
    function showhide(targetID) {
    	//change target element mode
    	var elementmode = document.getElementById(targetID).style;
    	elementmode.display = (!elementmode.display) ? 'none' : '';
    }
    function changetext(changee,oldText,newText) {
    	//changes text in source element
    	var elementToChange = document.getElementById(changee);
    	elementToChange.innerHTML = (elementToChange.innerHTML == oldText) ? newText : oldText;
    }
    function workforchange(targetID,sourceID,oldContent,newContent) {
    	showhide(targetID);
    	changetext(sourceID,oldContent,newContent);
    }
    //html
    <a href="javascript:workforchange('image','changer','Hide Image','Show Image');" id='changer'>Hide Image</a><img id="image" align="left" src="image.png">
    sorry about the cock-up lol u can tell im a newbie at posting lol

    www.mewan.net/mark/css/html.php
    Last edited by city_coder; 03-04-2008 at 02:26 PM. Reason: link wrong

Bookmarks

Posting Permissions

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