Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-19-2012, 06:43 PM   PM User | #1
m2244
Regular Coder

 
Join Date: Jun 2012
Posts: 129
Thanks: 1
Thanked 1 Time in 1 Post
m2244 is an unknown quantity at this point
Why am I getting a strange flickering problem

With the code below I have several buttons but when I hover over them they flicker side to side. This problem seems to only happen with the middle 4.

Are their hit areas overlapping somehow because I have not styled them yet?

Code:
<div id="floatingConsol" name='floatingConsol'>

<input type="button" id="googleSearchButton" class="searchButton"></input>
<input type="button" id="youtubeSearchButton" class="searchButton"></input>
<input type="button" id="wikiSearchButton" class="searchButton"></input>
<input type="button" id="DrudgeSearchButton" class="searchButton"></input>
<input type="button" id="TownHallSearchButton" class="searchButton"></input>
<input type="button" id="BenelliSearchButton" class="searchButton"></input><br/>
<div id="page_display">test text</div>

<script type="text/javascript" language="JavaScript">
	createListeners();
</script>
Code:
function createListeners(){
	$('.searchButton').click(function(){alert(this.id);});
	
	$(".searchButton").mouseenter(function () {$('#page_display').html(this.id);});
	
	$(".searchButton").mouseleave(function () {$('#page_display').html("");});
}
m2244 is offline   Reply With Quote
Old 09-19-2012, 06:58 PM   PM User | #2
m2244
Regular Coder

 
Join Date: Jun 2012
Posts: 129
Thanks: 1
Thanked 1 Time in 1 Post
m2244 is an unknown quantity at this point
Got it. I need to take a deep breath.

When the text in the 'page_display' textfield was too large, it caused that div to move left a bit causing the mouseleave event to fire and it would move back. Flicker.

Sorry for this question.
m2244 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:21 AM.


Advertisement
Log in to turn off these ads.