Access the only span inside an element using JQuery -


this might sound question asked before isn't. know how access elements using jquery in situation, parent element has colon in name making difficult. structure follows:

<fb:comments class='fb_iframe_widget'>    <span>something</span> </fb:comments> 

note span need access doesn't have id or class , when use regular jquery construct throws error due colon:

var fbspan = $('fb:comments span'); 

if colons not allowed in tag names, how facebook in first place? more importantly, how access span inside <fb:comments>?

you can using class if solves problem, like

$(".fb_iframe_widget").find("span"); 

or

$(".fb_iframe_widget span"); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -