jquery - Edit the placeholder attribute with IE7 -


i'm trying access , edit placeholder attribute of input field.

with ie8+ it's working. ie7 it's not.

i can access , read attribute, i'm not able edit attribute ie7. know attribute not working ie9 , less i'm using plugin make ie9 , less compatible.

//console.log display value on ie7 $item.attr('placeholder');   //get error on ie7, works ie8+. script3: member not found $item.attr('placeholder', 'value');  

any idea fix this?

thanks.

i suggest use jquery plugin use placeholders. several others plugins have same issue, daniel stocks' one works ie >= 7.

how use :

html

<input type="text" placeholder="text field" /> <textarea placeholder="text area"></textarea> 

jquery

$('input[placeholder], textarea[placeholder]').placeholder(); 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -