You need to read the jquery selector docs at
http://docs.jquery.com/Selectors/attributeHas#attribute


Below is the code that will get your data.
 $("span[printData]").text();



On May 4, 12:33 pm, Andy H <adharb...@gmail.com> wrote:
> For some reason this post disappeared.  Can anyone answer this?
>
> Thanks!
>
> On May 1, 10:01 am, Andy <adharb...@gmail.com> wrote:
>
> > This is an odd questions.  I have a huge form with a lot of data.
> > There is a table that data in it I need to display on a print screen
> > (of course this data isn't being displayed in the regular table).  So,
> > I put the display text in a span tag.
>
> > So, this is how each item will look:
>
> > <span printData="Item 1 detail to display">Item 1</span>
> > <span printData="item 2 detail to display">Item 2</span>
>
> > I need a way to grab all spans on the page that have the attributte of
> > "printData" and grab that text inside that attribute and print it out.
>
> > Any thoughts?

Reply via email to