title: check a given string has any span tags or not
body: <p>I am using <code>angularjs</code>. Now, I am facing some issues which is like -</p>
  
  <p>I have a string, </p>
  
  <pre><code>Driven professional with broad technical skill-set, very strong attention to detail and over 8 years experience in front-end web development.
  </code></pre>
  
  <p>In this I have highlighted the string <code>8 years</code> with adding the span class to this text. Now I have handled the select text and right click event. Now, When user selects this text and the right click on it, then I get the selected text, there I want to check whether the selected string has any span or not ? How can I check this ? Thanks in advance.</p>
  
  <pre><code>$scope.doSomethingWithSelectedText = function (event) {
            var valueofSelection = handleClick(event);
            var selectedText = getSelectedText();
          };
  
  
  var handleClick = function (evt) {
            if (evt.button === 2) {
              return true;
            }
            return false;
          };
  </code></pre>
  
  <p>Whole text is in one <code>p</code> and in that adding some spans</p>