Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
How can one get this value of a span with jQuery?

If we have this span, how can I get the value of sip, i.e. john.doe@xyz.de

<span class="ms-spimn-presenceWrapper ms-imnImg ms-spimn-imgSize-10x10">
      <img name="imnmark" title="" showofflinepawn="1" class="ms-spimn-img ms-spimn-presence-disconnected-10x10x32" src="/_layouts/15/images/spimn.png?rev=23" alt="User Presence" sip="john.doe@xyz.de" id="imn_1,type=sip">;                  
 </span>

Right now I use

var projectLeaderName = $('#projectLeader span').html();

to get the entire value of the span, but I don't know how to get the value of sip with jQuery.

I don't think this screenshot is necessary, but I'll add it for completion:

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use jQuery.attr to get the value of an attribute:

var projectLeaderName = $('span img').attr('sip');
console.log(projectLeaderName);
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<span class="ms-spimn-presenceWrapper ms-imnImg ms-spimn-imgSize-10x10">
      <img name="imnmark" title="" showofflinepawn="1" class="ms-spimn-img ms-spimn-presence-disconnected-10x10x32" src="/_layouts/15/images/spimn.png?rev=23" alt="User Presence" sip="john.doe@xyz.de" id="imn_1,type=sip">;                  
 </span>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!