Results 1 to 5 of 5

Thread: Newbie with jQuery code question

  1. #1
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default Newbie with jQuery code question

    Here is the page in question http://www.theremotedoctor.co.uk/karhonda.html

    As you can see the Item selection list is quite long,on this page and a couple others.
    If you were to select an item at the bottom you do not get the photo shown of the item in question.

    I think a jQuery code is the answer to make this happen ?
    Basically when you select the item i need the page to scroll so the photo is then shown.
    Currently making a selection loads the photo but its not viewable as its up the page a touch.

    Please advise,many thanks.
    Last edited by theremotedr; 04-12-2015 at 07:31 PM.

  2. #2
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    You just need some extra CSS and a short piece of Javascript to switch the position of the picture from scrolling to fixed after the page has scrolled up by a certain amount.

    Have a look at this page to show you how to do it.

    Edited to add: ... and here's another page with jQuery code.
    Last edited by styxlawyer; 04-10-2015 at 11:00 AM.

  3. #3
    Join Date
    Dec 2008
    Location
    Selby, North Yorkshire
    Posts
    90
    Thanks
    28
    Thanked 2 Times in 2 Posts

    Default

    Or alternatively why not go with a make then model submenu?

    <li><a href="karhonda.html">Honda</a>
    <ul>
    <li><a href="karaccord.html">Accord</a></li>
    <li><a href="karcivic.html">Civic</a></li>
    <li><a href="karjazz.html">Jazz</a></li>
    </ul>
    </li>

  4. #4
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Submenu is a good idea.

    Maybe not jQuery then as i think i will get lost.
    Can a piece of code be added to my original to go to content.

    Using this <li><a href="#content" class="scrollup">Top of page</a></li> i am taken to the item where the image will be shown no problem
    BUT
    In my code shown below the a= href is used hence why i asked about jQuery.
    <li><a href="javascript:" onclick="replaceMainImage('m-images/photos/HONDA003.jpg', 'Honda003','<b>£70.00</b><br>TEXT LINE 1<br>TEXT LINE 2<br>TEXT LINE 3<br><b>Uk Recorded £2.50</b><br><b>International Signed For £10.00</b><br>The Remote Doctor')">Stream remote only 2003-2006</a></li>

  5. #5
    Join Date
    Nov 2011
    Location
    Cider Region
    Posts
    1,132
    Thanks
    158
    Thanked 3 Times in 3 Posts

    Default

    Submenu added and spot on.

Similar Threads

  1. Newbie Question
    By Transentient in forum MySQL and other databases
    Replies: 1
    Last Post: 10-09-2011, 11:59 PM
  2. Anyone willing to help a newbie with jQuery?
    By goosefishplayer in forum JavaScript
    Replies: 2
    Last Post: 08-01-2011, 06:39 AM
  3. Resolved Newbie question
    By xtiano77 in forum PHP
    Replies: 6
    Last Post: 02-04-2009, 01:20 AM
  4. Newbie question
    By Wizwill in forum Other
    Replies: 2
    Last Post: 03-31-2008, 01:38 PM
  5. Newbie Question
    By Bracolla in forum HTML
    Replies: 2
    Last Post: 01-06-2005, 12:09 PM

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
  •