Jump to content

onfocus /blur


Shadowing

Recommended Posts

Hey guys I'm having a wierd issue that i cant quite understand. I have code that makes text appear and dissapear as you focus on itthe problem is the field dynamticly changes I have a map with a x and y axis and im displaying the x and y when a user focus on one it will go blank and then on blur display the axisthe problem is when i flip my map to another sector the X axis will be differant which displays fine but for some reason when i click on and then off it displays the axis number from the last sector. I'm assuming its because the function is still active from the last sector. so i have to like disable it some how

	  $('#sector_input_x').on({		focus: function() {		 		 if (this.value === session_x) this.value = '';		},		 blur: function() {		  if (this.value === '') this.value = session_x;		 }	  }); 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...