1

ive noticed that when you embedd a google docs iframe (onto, say your own website) it renders its pages as images. what im trying to do is get to one of those images/pages using jquery..in the html below can anyone tell me how to get the the last img? (the one with a really long source attribute value). thanks

<div id="content-pane" class="gview-scrollbar jfk-scrollbar" style="top: 37px; left: 0px; :    800px; height: 663px;">
     <div id="page-pane" class="">
         <div id=":0.page.0" class="page-element goog-inline-block" style="width: 739px;">
              <div>
                 <div class="highlight-pane"></div>
                 <div class="highlight-pane">
                 <div class="highlight-pane"></div>
                 <div class="highlight-pane"></div>
                 <img class="page-image" style="width: 800px; height: 1038px;display:     none;">
                 <img class="page-image" style="width: 719px;" src="?url=http%3A%2F%2Finfolab.stanford.edu%2Fpub%2Fpapers%2Fgoogle.pdf&docid=cbdffdac40189f88c8f7d1922dd915f5&a=bi&pagenumber=1&w=719">
                 <p id=":0.a11y.0" class="accessibility-text" tabindex="-1"></p>
            </div>
         </div> 
     </div>
</div>

1 Answer 1

1

try this...already tested,

$("#content-pane").find("img:last").attr('src')
1
  • will this enable me to get at the image thats nested in the ":0.page.0" div? because the thing is they are multiple divs that represent the different pages e.g :0.page.0, :0.page.1, :0.page.2, :0.page.3 etc.
    – Mulaiko
    Oct 2, 2012 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.