write Search.. in search box

Go down

In progress write Search.. in search box

Post by omarpop23 on May 29th 2016, 9:14 pm

how can i writ Search... in this search box like this



Last edited by omarpop23 on May 31st 2016, 10:46 am; edited 1 time in total
avatar
omarpop23
Forumember

Male Posts : 179
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

In progress Re: write Search.. in search box

Post by SLGray on May 29th 2016, 11:00 pm

Please change the title of your topic to something that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.
Please read our forum rules:  ESF General Rules


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.

avatar
SLGray
Administrator
Administrator

Male Posts : 43483
Reputation : 3090
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

In progress Re: write Search.. in search box

Post by Ange Tuteur on May 29th 2016, 11:43 pm

You can use one of the following scripts in all the pages.

Option 1 :
Uses an older placeholder method.
Code:
$(function() {
  $(function() {
    var fa_textarea = document.getElementById('fa_textarea');

    if (fa_textarea) {
      window.fa_textarea_placeholder = 'Search...';

      fa_textarea.value = fa_textarea_placeholder;

      fa_textarea.onfocus = function() {
        if (this.value == fa_textarea_placeholder) {
          this.value = '';
        }
      };

      fa_textarea.onblur = function() {
        if (!this.value) {
          this.value = fa_textarea_placeholder;
        }
      };

    }
  });
});

Option 2 :
Uses the placeholder attribute.
Code:
$(function() {
  $(function() {
    var fa_textarea = document.getElementById('fa_textarea');

    if (fa_textarea) {

      fa_textarea.placeholder = 'Search...';

    }
  });
});
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

In progress Re: write Search.. in search box

Post by omarpop23 on May 31st 2016, 10:51 am

i tried this but does not work:(
avatar
omarpop23
Forumember

Male Posts : 179
Reputation : 3
Language : Arabic
Location : Egypt

http://devs.ahlamontada.com

Back to top Go down

In progress Re: write Search.. in search box

Post by Ange Tuteur on May 31st 2016, 4:57 pm

I reviewed the scripts and there's no reason they shouldn't work, which leads me to believe the problem is from a script installed on your end. Please provide the URL of the forum you're installing this on, so I may inspect your forum.
avatar
Ange Tuteur
Forumaster

Male Posts : 13202
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum