<span class="stbuttontext" st_page="home">ShareThis</span>
I want to change "Share This" to "Share",
please let me know the solution.
thanksl,
Use the textContent property to change the text of a span element, e.g. span. textContent = 'Replacement text' . The textContent property will set the text of the span to the provided string, replacing any of the existing content. Here is the HTML for the examples in this article.
var span = $('<span />'). attr({'className':'folder_name' , 'text':'favre' }); var insert= $('<div/>', { className: "folder", html: span }); which yielded this result.
The <span> tag is an inline container used to mark up a part of a text, or a part of a document. The <span> tag is easily styled by CSS or manipulated with JavaScript using the class or id attribute. The <span> tag is much like the <div> element, but <div> is a block-level element and <span> is an inline element.
You can do with either:
$('.stbuttontext').text('Share');
for textual content or
$('.stbuttontext').html('Share');
for html contents.
In your case however, the first statement should be fine :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With