Modify home page with javascript/jquery
Example:
$(document).ready(function () { function hideHomeTitle() { $(".page_bar .page_title:contains('Home')").hide(); } /*Execute the hide home title after 1 second */ setTimeout(hideHomeTitle, 1000); });
So even though the DOM is fully loaded, I still need to throw in a delay for the element to be modified. Is there any other method to use here or something in the pipeline? Like an app.custom.formTasks.add('HomePage' .. or similar?
Thanks
Best Answer
-
Geoff_Ross Cireson Consultant O.G.Hi Morten,
Unfortunately, nothing else is available to you other than the rudimentary timeout.
However, if all you need to do is hide elements, you could do it with CSS?
Geoff6
Answers
Unfortunately, nothing else is available to you other than the rudimentary timeout.
However, if all you need to do is hide elements, you could do it with CSS?
Geoff
Normally CSS would be the right way for this of course, but I took the Home title as example because it has no Id or exclusive class so, as far as I see, if I hide the page_title in CSS I hide all the page titles and it's not possible to use a contain method in CSS for text inside elements, only attributes (ex. div[class*="test"] { } )