javascript,jquery,string,placeholder
You could use following snippet: var _$tmpSpan = $('<span/>').html($('#Test').attr('placeholder')).css({ position: 'absolute', left: -9999, top: -9999 }).appendTo('body'), textWidth = _$tmpSpan.width(); _$tmpSpan.remove(); alert(textWidth); --DEMO-- ...
html,validation,internet-explorer-8,placeholder
You may want to read the docs before posting on SO: The plugin automatically adds class="placeholder" to the elements who are currently showing their placeholder text. So, if your user enters a phone number, the placeholder class will be removed by the plugin. You can check for that class using...
css,padding,placeholder,search-form
Try adding text-align:center for id searchfield or add box-sizing: border-box; declaration. try with any one of below examples, it will move the placeholder to right as you expected, these will support Ie lower versions too. Example1 (using box-sizing:border-box declaration) #searchfield { padding: 10px 0 13px 0px; box-sizing: border-box; } Example2...
image,symfony2,internet-explorer-11,placeholder,liipimaginebundle
So what I did was to remove the no-sniff directive <IfModule mod_headers.c> #Header set X-Content-Type-Options: nosniff </IfModule> It seems that IE11 fails to get the correct content type of the image when no-sniff is turned on....
ruby-on-rails,forms,dynamic,helper,placeholder
Try this instead of title_template_'#{@template.id}' :placeholder => send("title_template_#{@template.id}") ...
inheritance,sitecore,placeholder
I think this is a side effect of how Layout Deltas in Sitecore work. When you define presentation in your Template, your setting up a bit of XML that describes the Template's idea of what the set of controls should be. When you then edit the Presentation Details on an...
I think this is what you want . HTML: <select id="choice"> <option value="0" selected="selected">Choose...</option> <option value="1">Something</option> <option value="2">Something else</option> <option value="3">Another choice</option> </select> CSS : #choice option { color: black; } .empty { color: gray; } JavaScript: $("#choice").change(function () { if($(this).val() == "0") $(this).addClass("empty"); else $(this).removeClass("empty") }); $("#choice").change(); try this...
xml,spring,properties,placeholder
Here is a Class that can be used to accomplish this: https://github.com/PE-INTERNATIONAL/org.spring.utils...
ios,objective-c,uitextfield,placeholder
As suggested by Apple, subclassing UITextField and overriding - (void)drawPlaceholderInRect:(CGRect)rect is the way to go: - (void)drawPlaceholderInRect:(CGRect)rect { UIColor *colour = [UIColor lightGrayColor]; if ([self.placeholder respondsToSelector:@selector(drawInRect:withAttributes:)]) { // iOS7 and later NSDictionary *attributes = @{NSForegroundColorAttributeName: colour, NSFontAttributeName: self.font}; CGRect boundingRect = [self.placeholder boundingRectWithSize:rect.size options:0 attributes:attributes context:nil];...
Sorry I have solved my problem by doing in this way <?php e($form->input('City.keyword',array('id'=>'CityKeyword','div'=>false,'label'=>false,'class'=>'forminput-new',"placeholder"=>"Consultant's name -OR- Area of expertise",'value'=>$keyword,'style'=>'width:99%;'))) ?> thanks...
css,internet-explorer,placeholder
Chances are your input[type=text] selector appears after your input:-ms-input-placeholder selector in your stylesheet, which is causing it to take precedence (because both selectors are equally specific). If that's the case, you'll want to move the placeholder rule below in order for that to take precedence. The most likely reason it...
python,django,forms,placeholder
Try to change base_fields here: for field in self.base_fields.values(): to fields: for field in self.fields.values(): base_fields dictionary is the base set of fields defined for the class. You can change it but it is not recommended and in your case not needed. I guess your version would work if you...
The input and its placeholder must have matching font styles input { width: 400px; height: 80px; } input, input::-webkit-input-placeholder { font-size: 20px; line-height: 2; } <input type="text" placeholder="This gets cut"> ...
html,css,font-awesome,placeholder
To accomplish this, use FontAwesome as font by setting the CSS font-family to FontAwesome and referring to the icons you want using the FontAwesome Unicode reference. For example, to have fa-envelope appear in a placeholder, you can use the following: <style type="text/css"> input {font-family:FontAwesome;} </style> <!-- use  which is...
You can take another attribute for old placeholder like in my code I take data-placeholder which hold old value when you want it can be used as old placeholder. HTML <input type='checkbox' name='u_id'> <input type="text" name="id" placeholder="ABC123" data-placeholder="ABC123"> ^^^^^^^^^^^ jQuery $('[name^="u_"]').change(function(){ if($(this).is(":checked")) { $(this).next("input, select").attr("disabled",true); $(this).next("input, select").attr("placeholder", "New Holder"); }...
jquery,jquery-ui,autocomplete,placeholder
We noticed that the issue was being solved by actually focusing the comboboxes. Once the combobox is focused, the autocomplete box disappeared and it remained that way when the combobox lost focus. So, our solution was a bit hack-ish, we added a .focus() followed by a .blur() : _create: function...
css,css3,contenteditable,placeholder
DEMO Disadvantage/Advantage of this solution: This solution will hide the text on focusing the element which is a disadvantage but its more or less a good thing as many peoples use javascript to hide placeholder text on input fields focus. Details: 1) Content shouldn't be a part of css, hence...
You may want to think about what the role and meaning of placeholders is. Most UI experts agree: placeholders are not labels. Labels (like "Search") are labels, and should be outside the text area. The placeholder is designed to be a sample input, or a format, not a label, nor...
css,animation,search,placeholder,smooth
Here is a simple example of how to style a search field in a similar manner as seen in your example. display: flex does most of the magic here, the rest is getting rid of backgrounds and borders or styling the submit button with an image For the typing animation...
c,sorting,placeholder,ternary-operator,bubble-sort
You cannot do it this way. But you can write an expression that will do a conditional comparison: if (is_ascending ? ptr->next->value < ptr->value : ptr->next->value > ptr->value) ... If is_ascending is guaranteed to be 0 or 1, here is an alternative with a single test that may be faster:...
Use only placeholders my $sql = "INSERT INTO queues_detail (id,keyword,data,flags) VALUES "; $sql .= join ', ', ("(?,?,?,?)") x @data; $dbh->do($sql, $undef, map { $id, @$_ } @data); Or don't use any at all my $sql = "INSERT INTO queues_detail (id,keyword,data,flags) VALUES "; $sql .= join(', ', map { "("...
Sure. Just apply the style to these CSS rules: ::-webkit-input-placeholder { font-style: italic; } :-moz-placeholder { font-style: italic; } ::-moz-placeholder { font-style: italic; } :-ms-input-placeholder { font-style: italic; } Probably not all of these rules are needed. I always just reference CSS Tricks because I always forget how to do...
jquery,css,timeout,placeholder
Instead of placing the placeholder in the image source itself, you can place it in the background of the image, which saves you some code as well. See this fiddle Just add a .placeholder class to the image : <img class="delay placeholder" src="" data-src="http://placehold.it/260x280/E8117F/FFFFFF?text=image+1" alt="" style="padding-top:120px; padding-bottom:120px"/> Then the CSS...
javascript,html,textarea,placeholder
The placeholder attribute has plain text as its value, by definition. No tags are recognized. Character references are recognized, but the effects of characters like TAB U+0009 (	) are defined to be implementation-dependent. So no, you can’t have HTML markup there. Your ultimate problem might have a solution, but you...
javascript,jquery,html5,placeholder
a jquery solution: you can use .focus() and .blur() events to handle your content of your textarea: so, when you focus, you don't need to display anything: $('textarea').focus(function () {$(this).empty()}); and when you don't focus on it: $('textarea').blur(function () {$(this).html('your placeholder...').css('color','gray');}); you can also check if user entered anything: $('textarea').blur(function...
java,replace,placeholder,illegalargumentexception,messageformat
Put a pair of single quotes around the part you don't want to be treated as parameter placeholders. i.e. ABC '{A WELL-KNOWN MAGICIAN}' WILL PERFORM AT {0} FOR {1} HOURS. ...
html,css,html5,css3,placeholder
You may use a textarea instead of an input, try that! and if you want to make it bigger just add cols="x" and rows="x" atributes on the textarea tag.
c#,asp.net,webforms,textbox,placeholder
Below code will help you protected void ddlUserSelected_SelectedIndexChanged(object sender, EventArgs e) { for (int a = 1; a <= int.Parse(ddlUserSelected.SelectedItem.Text); a++) { TextBox txtDate = new TextBox(); Label lbl = new Label(); lbl.Text = "<br/>"; txtDate.Width = 70; txtDate.CssClass = "tbl"; txtDate.ID = "txtDate" + a; PlaceHolder1.Controls.Add(txtDate); PlaceHolder1.Controls.Add(lbl); } }...
string,list,python-2.7,tuples,placeholder
Here is what I came up with - it is based on dwanderson's approach in the 2nd comment of the original post (question): table_name = name_a #name of table # Loop through all columns of dataframe and generate one string per column: cols_n = df.columns.tolist() placeholder = ",".join(["%s"]*df.shape[1]) #df.shape[1] gives...
html,.net,title,placeholder,resx
I have found solution to my problem. I have to use the following syntax to get words with spaces. <a title='@HttpContext.GetGlobalResourceObject(CustomersResource, "t_GoBackCustomer")'> The single quotes did the magic. For labels and controls we no need to use single quotes. But while using for html parameters like Title and PlaceHolder we...
validation,placeholder,contact-form
Use the [required] attribute selector to add the color just to required fields. [required]::-webkit-input-placeholder { /* WebKit browsers */ color: red; } [required]::-moz-placeholder { /* WebKit browsers */ color: red; } [required]::-ms-input-placeholder { /* WebKit browsers */ color: red; } <input type="text" placeholder="not required" /> <br> <input type="text" placeholder="required" required/>...
mysql,replace,wildcard,placeholder
Using SUBSTRING_INDEX: UPDATE table1 SET column1 = REPLACE( column1, SUBSTRING_INDEX(column1, '/', 2), 'newsite.com' ) WHERE column1 LIKE 'example.com/%/' This should honour your subfolder structure....
Placeholders can only be used where an expression is expected. What follows LIMIT must be a row count (not an expression), so it can't be a placeholder. #!/usr/bin/perl use warnings; use strict; use DBI qw( ); my $dbh = DBI->connect("DBI:CSV:", undef, undef, { PrintError => 0, RaiseError => 1, }...
I fixed your issue and now there are visible all placeholders. Check this: http://cssdesk.com/PWNzt I think that the issue was there that you used ” insetead of "...
javascript,jquery,placeholder,mapbox
It wasn't working in your example because jQuery wasn't included. If you don't want to use jQuery, you could use the following: Updated Example document.querySelector('.leaflet-control-mapbox-geocoder-form input').placeholder = "Search for Location"; You can also add an event listener for the ready event and then change the placeholder attribute within the callback....
javascript,jquery,firefox,placeholder
The placeholder attribute The placeholder attribute on <input> and <textarea> elements provides a hint to the user of what can be entered in the field. The placeholder text must not contain carriage returns or line-feeds. Source: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms_in_HTML So unfortunately I think this can not be done natively. You could however...
spring,maven,datasource,placeholder,jrebel
This can happen if you're using resource filtering with JRebel, as the application looks up the bean's xml in its unfiltered form from the project working directory (as per rebel.xml). To resolve this, you'll need to update rebel.xml for that module, adding exclude for that particular XML file - see...
database,codeigniter,ckeditor,placeholder
When you are using the CKEditor with the placeholder plugin you may have a text/html email template saved in your database with something like Dear {f_name}, You owe us {money} Euros. The tags {f_name} and {money} are examples and can be the placeholders you want. When you are populating the...
Yes, but it seems like you will need to use vendor prefixes for now. input { text-align: right; } ::-webkit-input-placeholder { text-align: center; } :-moz-placeholder { /* Firefox 18- */ text-align: center; } ::-moz-placeholder { /* Firefox 19+ */ text-align: center; } :-ms-input-placeholder { text-align: center; } <form> <fieldset> <label>...
asp.net,asp.net-mvc,font-awesome,placeholder
This should work for you: @Html.TextBoxFor(m => m.Email, new { @class = "form-control login-input", placeholder = HttpUtility.HtmlDecode(" Username or Email"), style = "font-family:Arial, FontAwesome" }) Need to use the font awesome code and add the font family, as well as HtmlDecode the code....
It is because MySQL is doing a string comparison, and the string "-5" is greater than the string "-3" even though the number -5 is less than the number -3. The behavior you are experiencing is expected, it is not "broken" as you claim. When using a placeholder, the bound...
You could use sympy for symbolic computation: In [126]: import sympy as sy In [127]: sy.simplify('2*x+x') Out[127]: 3*x To convert rationals to floats, use sy.nfloat: In [170]: sy.nfloat(sy.simplify('2*3+x+3/4')) Out[170]: x + 6.75 ...
cheers dudes, less/sass it is...
java,spring,properties,configuration,placeholder
I believe this has to do with how spring works with pre/post processors. Basically you can have duplicated definition or use a different mechanism for loading properties. As much as I know before spring 3.1 duplication is the only way. More on http://www.baeldung.com/2012/02/06/properties-with-spring/#parent-child...
javascript,append,textarea,placeholder
Although I don't quite understand what you want, here's what I think you want: var textarea = document.getElementById('test'); setInterval(function () { textarea.placeholder += ' and on'; }, 1500); <div id="comp"><textarea id='test' placeholder="Write on me now, or else... you will have to watch me write on"></textarea></div> Every 1.5 seconds, and on...
github,branch,markdown,placeholder
No, I'm not aware of anything like that within READMEs or any other markdown documents when browsing through the source of your project. And nothing turns up when searching their help page either. However, GitHub Pages offers all sorts of info about the repo the document is associated with. Of...
html,css3,transition,placeholder
Try this adding onfocus and onblur attributes to the input: <input type="search" onfocus="placeholder='some text'" onblur="placeholder=''" /> Fiddle: http://jsfiddle.net/dW92N/3/...
html,css,sass,webkit,placeholder
You can't use it single, only with selector: input::-webkit-input-placeholder { color: #9B9B9B; } input:-ms-input-placeholder { color: #9B9B9B; } input::-moz-placeholder { color: #9B9B9B; } Mixin: @mixin placeholder($selector, $color) { #{$selector}::-webkit-input-placeholder {color: $color} #{$selector}::-moz-placeholder {color: $color} #{$selector}:-ms-input-placeholder {color: $color} } Usage: @include placeholder('.input-class', #FFFFFF); Live example P.S. Do not use them all...
css,css3,sass,css-selectors,placeholder
The issue is not with the placeholder, but the fact that you are trying to apply a ::before pseudo-element to an input, which isn't supported cross-browser because it's not defined within the standards. See this answer. Since this obviously depends on the form element being [data-required] (although it's not clear...
javascript,php,jquery,ajax,placeholder
You have a space between <textarea> tags, so it is inserted into textarea. If you remove it, you will be able to see a placeholder. $info.='<div class="comment-part" id="commentBox'.$post_id.'"><textarea name="commentq'.$post_id.'" id="commentq'.$post_id.'" class="textarea-style1" placeholder="Comment.." onkeydown="return runScript1(event,\''.$post_id.'\',\''.$cmt_id.'\')"></textarea></div></div>'; ...
javascript,html5,input,focus,placeholder
You need to show .input-text-container, but your code works. Try this: $('.search.icon-search').on('click',function(e) { e.preventDefault(); $(".input-text-container").show(); $('#textSearch').focus() }); http://jsfiddle.net/3zkpgvj5/...
html,css,google-chrome,placeholder
Thanks @JDTLH9 for giving me a clue for the problem .actually you dont have to use inline style but in the previous design i was using {font-family:fontawesome}; but when i converted it to this : {font-family:Arial,fontawesome} it worked for me in the chrome....
javascript,html,css,asp.net,placeholder
use display: none; css instead of visibility:hidden; display: block; to show the element back. visibility controls the visibility but the space is still preserved. But display:none clears the space as if the element was not even there....
javascript,html,html5,forms,placeholder
var labels = document.querySelectorAll("label"); var i = labels.length; while (i--) { var label = labels.item(i); var text = label.textContent; label.parentNode.classList.contains("required") && (text += "*"); label.nextElementSibling.setAttribute("placeholder", text); } ...
I don't think there's any ngPlaceholder directive. Try changing your code to: <input type="text" class="form-control" id="Username" name="Username" data-ng-model="user.Username" required="" placeholder="{{user.AdAccount ? 'Username' : 'Ad Login'}}" /> Thas is, change ng-placeholderinto just placeholder, and everything should work fine. (Note also the self-closing slash if you need to conform to valid XHTML.)...
javascript,html,angularjs,placeholder,angularjs-interpolate
You could directly use interpolation {{}} directive directly in placeholder attribute. Markup <input placeholder="{{betLoader ? 'Risk': ''}}" ng-model="parlayData.win"> Update To update spinner content you could use ng-bind-html there. Html <div> <div ng-bind-html="betLoader ? '<span class="spinner"></span>': 'Win'"><div class="spinner"></div></span> <div ng-show="!betLoader">Win</div> </div> ...
javascript,html5,forms,placeholder
var labels = document.querySelectorAll("label"); var i = labels.length; while (i--) { var label = labels.item(i); var text = label.textContent; label.parentNode.classList.contains("required") && (text += " *"); var nextElement = label.nextElementSibling; // This is what I changed: if (nextElement.tagName == 'SELECT') { nextElement.options[0].text = text; } else { nextElement.setAttribute("placeholder", text); }...
css,css-selectors,placeholder,pseudo-class
Unfortunately, without making use of a preprocessor (since this is CSS), the best you can do is to group each set of vendor prefixes for both .red-va and .blue-va, but not all of them into a single ruleset: .red-va::-webkit-input-placeholder, .blue-va::-webkit-input-placeholder { color: white; } .red-va:-moz-placeholder, .blue-va:-moz-placeholder { /* Firefox 18-...
inheritance,key,sitecore,placeholder
For sure last example. You can have different Group Layouts defined for main tags: <header> -> sc_plh_header <content> -> sc_plh_content -here you can render your grouped layouts explained below. <footer>-> sc_plh_header sc_plh_content sitecore placeholder will have grouped placeholders (sublayouts) based on pages type: content for: Homepage, Sitemap, Article, News, Products,...
The value content attribute gives the default value of the input element. http://www.w3.org/TR/html5/forms.html#attr-input-value To set the default value of an input element, use the value attribute. <input type="text" value="default value"> ...
jsf,input,el,placeholder,conditional-operator
Conditional statements in EL are indeed not writable. They are read-only. End of story. The same applies to method references in EL as in #{bean.property()}. It must really be a true value expression as in #{bean.property}. Your approach of using a (HTML5) "placeholder" is actually wrong. For that you should...
See the code below. What it does, it gets rendering references for the selected items, checks their placeholders and rendering names and updates xml value of the __Renderings field of selected item, based on the unique id of selected renderings. Then it fires same code for all descendants recursively. This...
text,android-studio,placeholder,hint
Just dont use the gravity and use padding left :). <EditText android:layout_width="280dp" android:layout_height="55dp" android:inputType="textEmailAddress" android:ems="10" android:id="@+id/email" android:layout_centerVertical="true" android:layout_centerHorizontal="true" android:background="@drawable/email" android:hint="Email" android:paddingLeft="70dp" /> ...
Create and connect IBOutlet to your textField. In YourViewController.m @interface YourViewController () <UITextFieldDelegate> @property (weak, nonatomic) IBOutlet UITextField *txt; In your viewDidLoad self.txt.delegate=self; self.txt.textAlignment=NSTextAlignmentCenter; Write this delegate method..this method calls everytime when text in text field changes. - (BOOL) textField: (UITextField *)theTextField shouldChangeCharactersInRange: (NSRange)range replacementString: (NSString *)string { NSRange textFieldRange...
Here is a solution without reexp: str = "\\c 2 foo \\v 1 bar \\v 2 foo \\v 3 bar " + "\\v 4 foo \\c 3 bar \\v 1 foo \\v 2 bar" x = str.split.slice_before('\c').map do |c_token,chapter,*rest| [c_token,chapter]+rest.map.with_index do |x,ix| if rest[ix-1] == '\v' chapter+':'+x else x end...
formatting,powerpoint,placeholder,powerpoint-2010
Use one of the layouts that provides two columns of text (Two Content or Comparison). Or add your own text box, set it to two columns and to auto-fit text to placeholder. Otherwise, you'd need to add code to trap the selection change event, and if the previous selected shape...
wpf,vb.net,xaml,textbox,placeholder
There's nothing wrong with a XAML only solution. <Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}" x:Key="TextBoxWithWatermarkStyle"> <Setter Property="Padding" Value="3"/> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="Black"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TextBox"> <Border BorderThickness="1" CornerRadius="1" Background="{TemplateBinding Background}"> <Grid>...
I think you can achieve this with CSS only in google chrome. For example: You can select the first letter of placeholder ::-webkit-input-placeholder::first-letter { color: red; text-decoration:underline; } Result: The text-decoration does not render when set with :first-letter in Chrome (Version 39.0.2171.71). So we can achieve the underline with border-bottom....
c#,ios,monotouch,uitextfield,placeholder
Just simplify what you already have :-) This works on iOS7: var t = new UITextField() { AttributedPlaceholder = new NSAttributedString("some placeholder text", null, UIColor.Red) } ...