Options

Help finding how they are doing this

qwertyiopqwertyiop Member Posts: 725 ■■■□□□□□□□
Does anybody here know how this company added the capability to expand to show a pdf and collapse by just clicking on one of the press releases?

Press Releases for BRIDGE Energy Group

Comments

  • Options
    paulgswansonpaulgswanson Member Posts: 311
    I'v PMed you a snippet of thier code.

    I cant be sure because my work pc won't let me run it locally the right way icon_sad.gif it keep blocking active x >_< stupid GPOs
    http://paulswansonblog.wordpress.com/
    WGU Progress: B.S. Network Management & Design <- I quit (got bored)
  • Options
    radixradix Member Posts: 34 ■■□□□□□□□□
    you can code it in your client side of your code quickest way i know is to use jquery don't know if its excalty what your looking for
    jQuery UI - Accordion Demos & Documentation
    If you ain't pissed off for greatness that means you're okay with being mediocre
    _________________________________________________________________
    Studying CCNA
  • Options
    MJohnsonresMJohnsonres Member Posts: 31 ■■□□□□□□□□
    qwertyiop wrote: »
    Does anybody here know how this company added the capability to expand to show a pdf and collapse by just clicking on one of the press releases?

    Press Releases for BRIDGE Energy Group

    http://www.dynamicdrive.com/

    From what I can see they are not actually expanding to show the pdf. They are expanding to show text that they typed in which is also in the pdf file.

    Rt-Click web page, View page source

    At the top of the HTML you will see a script type: <script type="text/javascript" src="sdmenu.js"></script> The file sdmenu.js has the source code for making the section expand.

    Now Look for the an "a herf" tag that has a lot of text following it.
    the beginning tag <a herf=" ">
    the ending tag <a>
    They typed some of the pdf text between the beginning and ending tag.
    Notice how the tag div class="collapsed has a class of collapsed. This is why you don't see the text until you click in the area.





    If you are using Chrome, just Rt Click on the element you are interested in and select, "Inspect element".
Sign In or Register to comment.