Advanced Search

Results 1 to 6 of 6

Thread: hiding the links on Ajaxtabscontent

  1. #1
    Join Date
    Aug 2009
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow hiding the links on Ajaxtabscontent

    could someone help me to hide tab links on dynamicdrive's ajaxtabscontent script?

    'cause, some users trying to open pages with "open in new window"...

    http://www.dynamicdrive.com/dynamici...tent/index.htm

    i want to show a small keyword on href of tabs; not the whole link. and to decode the keyword links, i think i should add a 'if condition' into ajaxtabs.js .. but how??


    for example:
    into html: <a href="#1">tab1</a> (not <a href="whoweare.php">tab1</a>)

    into js: if (pageurl = #1) {pageurl = whoweare.php}
    Last edited by orhun; 11-06-2009 at 09:52 AM.

  2. #2
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,626
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Hi orhun,

    I have made some changes in ajaxtabs.js file to accomodate the points you've mentioned.

    Just replace the default (I would say to rename the default ajaxtabs.js to ajaxtabs_0.js) with the attached file.

    I haven't got much time for checking the outcome though I am pretty sure that the code should work without any issues.

    Most importantly you don't have to make any changes in the markup that needs this script by default like the way you've suggested. Everything will be handled by the JS. In other words in your application just replace the current ajaxtabs.js with the one attached in this post. Thats all you need to do.

    Let me know if there is any issues.

    Hope this helps.

  3. #3
    Join Date
    Aug 2009
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much Codeexploiter...

    but... could u also explain how to use this script?

    - what will i show in href? <a href="#1">tab1</a> or something else?

    - and, where will i show that #1 = whoweare.php ?
    ( if (pageurl = #1) {pageurl = whoweare.php} etc.)

  4. #4
    Join Date
    Aug 2009
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    could someone help me?

  5. #5
    Join Date
    Aug 2009
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ????????

  6. #6
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,626
    Thanks
    6
    Thanked 107 Times in 107 Posts

    Default

    Give your tab links like the following code itself. The links should be replaced with your own links. The rest will be handled by JS (it will store those links internally and remove them from anchor elements as you've mentioned).

    Code:
    <ul id="countrytabs" class="shadetabs">
    <li><a href="#" class="selected" rel="#default">Tab 1</a></li>
    <li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
    <li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
    <li><a href="external4.htm" rel="#iframe">Tab 4</a></li>
    <li><a href="http://www.dynamicdrive.com">Dynamic Drive</a></li>
    </ul>

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
  •