Monday, January 27, 2014

jQuery - How to Change Html of Particular Html Element like div,span,p etc..

How to Change Html of Particular Html Element like div,span,p etc..

I am wordpress developer working on Wordpress, Php Website since 5 Years. When I start Learning jQuery When I am fresher at that time I face so many problem. this is one problem that I had face out. Now a days also many developer facing same issue who does not know how to do it ? this post for only those people... 

Lets start It.. 

We have Html Code Like this 
<h3 class="comment-reply-title" id="reply-title">Leave a Reply </h3>

Wanted Like this

<h3 class="comment-reply-title" id="reply-title"><div style="font-style:normal;color:#0000FF;margin:0px 0px 10px;font-size:16px;font-weight:bold;">Add a comment</div></h3>

Solution :

<script type="text/javascript">
jQuery("#reply-title").html('<div style="font-style:normal;color:#0000FF;margin:0px 0px 10px;font-size:16px;font-weight:bold;">Add a comment</div>');
</script>


A blogger

I am passionate blogger cum B.Tech. Computer engineering graduate. I love writing blog post. I spend my free time in writing blog post that will useful to everyone (including me). I have had some success making money blogging and want to help others do the same. I just figured that by creating a great and free resource a lot of links would follow – and they have. Some people ask me how they can repay me – which is not necessary - but for those wanting to show their appreciation, I just say linking to the article from their blog is the best compensation I could receive. Thanks for reading!

0 comments:

Post a Comment

Thanks for commenting. I will Reply you soon

 

Copyright @ 2013 PHP WORDPRESS MAGENTO .

Designed by Kcon Technosoft