Ning Developer Docs

Hi, I'm using some code that I found to adapt the module headers on my home page. However, I need to change it so that instead of "appending" text to the end of the existing text it will replace the text or add new text before the existing text (for example for "Blog Posts" instead of doing "Blog Posts Featured" it will say "Featured Blog Posts" or some other text altogether.
Here's the code I've been using:
& gt script language="javascript">
x$(document).ready(function() {
x$(".xg_module_head").find("h2:contains('Blog Posts')").append(" Featured");
});
& gt/script>

Thanks!

Views: 0

Replies to This Discussion

Try changing "append" to "prepend" in your code. That will add to the beginning instead of to the end.

To change the text altogether, change "append" to "text"

See this: http://docs.jquery.com/Manipulation
THANK you SO much!!
You're welcome! Always glad to help. :)

RSS

© 2026   Created by Ning Developer Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service