Results 1 to 10 of 10
-
12th Oct 2012, 09:39 PM #1OPMemberWebsite's:
YourVPNList.blinkweb.comHow to make an Auto changing text with link via html??
How to make an Auto changing text with link via html??
I need to know what code i must use to make a TEXT with links changing by timer or even by page reload so each time the user move from page to page the text changes.
the text will be with links to another pages on same site or even to outside from it it looks like this:
free games ( as first text for exa )
hot offers ( as second text for exa)
... and so on
so the user will see more than one text while he reading or looking at my site
Thanksmyincome2020 Reviewed by myincome2020 on . How to make an Auto changing text with link via html?? How to make an Auto changing text with link via html?? I need to know what code i must use to make a TEXT with links changing by timer or even by page reload so each time the user move from page to page the text changes. the text will be with links to another pages on same site or even to outside from it it looks like this: free games ( as first text for exa ) hot offers ( as second text for exa) ... and so on Rating: 5
-
13th Oct 2012, 04:51 AM #2Respected MemberWebsite's:
DL4Everything.com Soft2050.inExample through PHP:
PHP Code:<?php
$text = array(
'My first text',
'rotating',
'on each page reload',
'......',
'so on.');
$randomIndex = rand(0, count($text) - 1);
echo "$text[$randomIndex]";
?>
-
13th Oct 2012, 06:13 AM #3OPMemberWebsite's:
YourVPNList.blinkweb.comThanks Bro for help
But what about link for each text?
what about timer option?
some details about this code what i can change or use inside it?
thanks so much
-
13th Oct 2012, 07:02 AM #4MemberWebsite's:
sborg.usPHP Code:<?php
$text = array(
'My first text' => 'http://mylink1/',
'rotating' => 'http://mylink2/',
'on each page reload' => 'http://mylink3/'
);
$random = array_rand($text);
echo "<a href=\"$random\">$text[$random]</a>";
?>
As far as timer is concerned, check out jQuery based link rotators - I guess that's what you're looking for.
V3g3ta | Halcyon | Abhi
-
13th Oct 2012, 08:26 AM #5OPMemberWebsite's:
YourVPNList.blinkweb.comThanks so much for help
so for timer i need to use another code than html or php?!
can u help me in one please?
best regards
-
13th Oct 2012, 03:16 PM #6Respected Developer
demo: http://jsfiddle.net/3p87Z/
PHP Code:<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Change Text</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// this shit done by mRAza
// setting current element
var current = 0;
// starting interval for 2 seconds
setInterval(changeText, 2000);
function changeText(){
// links array with text to tdisplay
var links = [
{"text" : "google site", "link" : 'http://google.com' },
{"text" : "yahoo web", "link" : 'http://yahoo.com'},
{"text" : "KWWHunction ftw", "link" : 'http://besthostingforums.com'}
]
// lets check if total arrays are reached so we start from first element
if(links.length == current){
current = 0;
}
// change the text
setTimeout(function() {
$("#demo").text(links[current]['text']).attr('href', links[current]['link']);
current++;
}, 1900);
}
});
</script>
</head>
<body>
<div><a id="demo" href="http://google.com">google</a></div>
</body>
</html>
Bots Development | Web Development | Wordpress Customization | PSD Conversion
Life has many twists and turns in it, you have to take what you are given and use it for the best.
-
13th Oct 2012, 03:28 PM #7OPMemberWebsite's:
YourVPNList.blinkweb.comThanks Bro for your help and thanks for all who share the ideas here
this is what i want
Best Regards
-
13th Oct 2012, 03:30 PM #8Respected Developer
yes but remember next time I might not help you if I dont see any code from your side, First always try to do it and when you cant do it yourself then post thread with your code....that's way you will learn....goodluck
Bots Development | Web Development | Wordpress Customization | PSD Conversion
Life has many twists and turns in it, you have to take what you are given and use it for the best.
-
13th Oct 2012, 03:41 PM #9OPMemberWebsite's:
YourVPNList.blinkweb.comThanks I will do for sure
Best Wishes for All
-
23rd Oct 2012, 07:57 PM #10OPMemberWebsite's:
YourVPNList.blinkweb.comi try to put this code with my wanted links on Joomla html modul but it does not work only show first text and not change by itself
anything i have to make?
thanks
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Make new page ( auto ) HTML
By r00ts in forum Webmaster DiscussionReplies: 2Last Post: 14th Feb 2012, 03:23 PM -
Help changing text on the image
By MediaStar in forum Graphics AreaReplies: 3Last Post: 20th Jan 2012, 04:34 PM -
[Selling] Wautoposter VPS Auto Download Auto Upload Post On Wordpress make 30 to 100 post daily
By jpavsex in forum Completed TransactionsReplies: 54Last Post: 15th Dec 2011, 11:36 PM -
Changing post text size
By saini in forum vBulletinReplies: 2Last Post: 25th Oct 2011, 11:24 AM -
[HTML] Text Formatting
By Rapid S in forum Web Development AreaReplies: 2Last Post: 15th Jun 2010, 02:12 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...