In my “Messing With Entrecard Droppers” I mentioned how I wrote a small script that would move the Entrecard whenever somebody tries to click on it. A couple of you wanted this script. I decided to modify it a bit to allow for others to use it more easily.
Not only can this script be used for moving Entrecards, but it can be used to move images, divs, whatever. You can slap it on any HTML element and it should work. Here it is.
1. Download the elusive Caveman Conclusion ChaseIt script
(Right-click, save link/target as).
2. FTP it to your site.
3. Include the script
<script type="text/javascript" language="javascript"
src="http://yourdomain.com/ChaseIt.js"></script>
4. Wrap a DIV tag around what you want to apply the script to. If applying to an image only, you do not need to wrap a DIV around it.
<div><img src="image.jpg"></div>
5. If using a div, be sure to add a style for the width and height. The script requires this so that it won’t exceed the boundaries you give it. You may also want to add z-index to keep it on top of everything else.
<div style="width:127px;height:150px;z-index:200;">
<img src="image.jpg"></div>
6. Add the script to the onmouseover event on the element.
<div style="width:127px;height:150px;z-index:200;"
onmouseover="ChaseIt(this,event,10,1000,700,'fooled ya!')">
<img src="image.jpg"></div>
ChaseIt Script Parameters
Syntax: ChaseIt(this,event,count,width,height,msg) (Bold is optional)
- count is the number of moves before the message appears. Default is 10.
- width and height, pixel size of boundary in which element is free to move around. Default is 1000, 700
- msg is your message that will appear after the count of moves has been reached. Enclose msg in single quotes. Default is “Ok, I guess I’ll let ya click it.”
Final Result
<!-- Include script -->
<script type="text/javascript" language="javascript"
src="http://yourdomain.com/ChaseIt.js"></script>
<div style="width:127px;height:150px;z-index:200;"
onmouseover="ChaseIt(this,event,15,1000,700,'Wow, I tricked ya!');">
[Your image, link, <script> or whatever here]
</div>
Use at your own risk. I take no responsibility for anything.
Note: Use of this script may piss off some of your visitors. I think you should use it anyway. Fee free to link back here so others can get it too.
Caveman Conclusion: Tricks are for kids.
Share This Post:
These icons link to social bookmarking sites where readers can share and discover new web pages.
Posted in Blogging Crap, Scripts, Technology | 17 Comments »