Problem with javascript which change text in index_body template
3 posters
Page 1 of 1
Problem with javascript which change text in index_body template
Hello,
I am using the following javascript to change the text "Members connected during last 24 hours :" in my index_body template
can someone helo me to fix it?
Previously it was working the problem appeared after the translation/correction also I was substitute the previous text in javascript with new one.
I am using the following javascript to change the text "Members connected during last 24 hours :" in my index_body template
- Code:
<script type="text/javascript">
$(function(){
$("div.Today_Members").html($("div.Today_Members").html().replace("Μέλη που έχουν συνδεθεί κατά τις τελευταίες 96 ώρες","Μέλη που έχουν συνδεθεί στο φόρουμ κατά τη διάρκεια των τελευταίων 24 ώρων"));
});
</script>
can someone helo me to fix it?
Previously it was working the problem appeared after the translation/correction also I was substitute the previous text in javascript with new one.
Re: Problem with javascript which change text in index_body template
Have you tried adding it in the JavaScript Management instead of the template?
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Problem with javascript which change text in index_body template
Hello @SLGray,
Yes but it hasn't got any effect. I dont know if the character : is javascript reserved character and making the problem in javascript code.
Placement: In the homepage
Javascript code:
Yes but it hasn't got any effect. I dont know if the character : is javascript reserved character and making the problem in javascript code.
Placement: In the homepage
Javascript code:
- Code:
$(function(){
$("div.Today_Members").html($("div.Today_Members").html().replace("Μέλη που έχουν συνδεθεί κατά τις τελευταίες 96 ώρες", "Μέλη που έχουν συνδεθεί στο φόρουμ κατά τη διάρκεια των τελευταίων 24 ωρών"));
});
Re: Problem with javascript which change text in index_body template
There are two spaces here: κατά τις
Add this script at the end of index_body:
Add this script at the end of index_body:
- Code:
<script>
$(".Today_Members").html(function() {
return this.innerHTML.replace("Μέλη που έχουν συνδεθεί κατά τις τελευταίες 96 ώρες", "Μέλη που έχουν συνδεθεί στο φόρουμ κατά τη διάρκεια των τελευταίων 24 ώρων")
});
</script>
Re: Problem with javascript which change text in index_body template
Topic solved and archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Problem with javascript on index_body template
» How to Change the Text Colour in JavaScript
» Asking about get text and replace text in Javascript
» Replace text to emoticon using javascript
» Making Javascript word count box have a different text input colour
» How to Change the Text Colour in JavaScript
» Asking about get text and replace text in Javascript
» Replace text to emoticon using javascript
» Making Javascript word count box have a different text input colour
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum