Geeks With Blogs
Murali Sankar

Here is the scenario in my Application:


I was displaying kendo grid with inline edit feature, while validating rows it was displaying validation messages like "This field is required" with font color is gray, my requirement was, displaying this messages in red color.


i override css classes or adding new css class to message div as follow, but it was not working, i tried many ways but nothing was working for me because i was applying style before it is creating so it didn't work for me.


.k-tooltip-validation{ color:red !important}

 

$(".k-tooltip-validation").attr("style","color:red !important");


As message div is creating dynamically i used below statements to apply style and it is working fine.


 $("#optionsGrid").on('DOMNodeInserted'function (e) {

                    $(".k-tooltip-validation").css("color""red"); // Here i am changing the color of div using css class

                    $(".k-tooltip-validation").each(function (){   this.style.setProperty("color""red","important"); // Here i am setting the priority for that color property

});                  

                });


i applied above logic only for grid if you want to apply for whole document you can use $("document") or if you want to apply for only some area you can you only that id. 


It is working for IE11, firefox4.x, Chrome, i didn't test for safari.


Thanks.......
Posted on Sunday, June 12, 2016 3:41 PM JQuery | Back to top


Comments on this post: Change CSS for dynamic controls using JQuery

# love marriage spcialist
Requesting Gravatar...
Astrology specialist G.Swami ji is the very well famous astrologer. He is the well expert and well experience in astrology. He shows the perfect image of astrology & that convey the right message to the client.
Left by kuldeep bhargav on Jun 19, 2016 5:31 PM

# re: Change CSS for dynamic controls using JQuery
Requesting Gravatar...
ShowBox for Android is an amazing app that allow you to watch your favorite movies: Free movies app
Left by Dusty2016 on Jun 21, 2016 1:45 PM

# re: Change CSS for dynamic controls using JQuery
Requesting Gravatar...
Now there is more convenience for whatsapp user with the help of latest and updated version. add account by using email address or through phone number more easy through spy whatsapp without knowing them and share there photos, video's, and lot more for cost less while using your wi-fi or your data plan's.
Left by whatsApp Messenger on Jul 04, 2016 8:48 PM

# re: Change CSS for dynamic controls using JQuery
Requesting Gravatar...
http://showboxtv.net/
Left by showbox on Jul 31, 2016 12:00 AM

# re: Change CSS for dynamic controls using JQuery
Requesting Gravatar...
http://showboxappandroid.info/
Left by showbox on Aug 01, 2016 4:56 PM

# re: Change CSS for dynamic controls using JQuery
Requesting Gravatar...
watch and download movies and shows on your androdi device using showbox pro app

http://showboxpro.com/
Left by mohan4795 on Dec 06, 2016 11:15 AM

# re: Change CSS for dynamic controls using JQuery
Requesting Gravatar...
We have archived this blog to find changes on css for dynamic controls using jquery blogs. That every topic you must follow for having grademiners and reviews. Then everything will go for best in all the times, and thank you.
Left by Reza on Jan 29, 2017 9:18 AM

# re: Change CSS for dynamic controls using JQuery
Requesting Gravatar...
I'm styling up a customer entrance where the foundation picture should be diverse as per the specific segment of the entry the client is taking a gander at. Video Animation Services The thing is this is .net and the source code can't be transformed, it is delivered powerfully. I'm expecting I can't accomplish this with unadulterated CSS, so how might I do it with jQuery?
Left by Hilarys on Apr 21, 2017 4:14 PM

# dert
Requesting Gravatar...
I strongly believe that you are writing good content on the Internet and I've subscribed to your website also i made the bookmark of that link. Temporary Embankment Steps?
Left by noop on Jan 31, 2018 10:54 AM

# kour
Requesting Gravatar...
Wow these tattoos are looking so gorgeous or nice as i have noticed it was done by a good artist who got huge talent. I truly appreciate them.
Crypto Currency news
Left by noor on Feb 25, 2018 6:49 PM

Your comment:
 (will show your gravatar)


Copyright © MuraliSankarM | Powered by: GeeksWithBlogs.net