• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Sogwap Sandbox

Test Site

Menu

  • Home
    • Sample Page
  • Beaver Pages
    • Alt Home Page
    • Cobalt Sample Demo
    • MstrClss
    • BB 100% Height Demo
    • FullPage JS
You are here: Home / Uncategorized / GF Adaptive Placeholder #2

GF Adaptive Placeholder #2

Contact Us

Here's the JQuery:

jQuery('li.gfield input').removeAttr('placeholder'); jQuery('li.gfield textarea').removeAttr('placeholder'); jQuery(document).ready(function($) { $("input[type='text'], textarea").focus(function(){ $(this).parents("li").removeClass("Blur"); $(this).parents("li").addClass("Focus"); }).blur(function(){ $(this).parents("li").removeClass("Focus"); $(this).parents("li").addClass("Blur"); }) $( "input[type='text'], textarea" ).change(function() { if ( $( this ).is(":valid") ) { $(this).parents("li").addClass("Valid"); } else { $(this).parents("li").removeClass("Valid"); } //$(this).parents("li").toggleClass("Valid"); }); $( "input[type='text'], textarea" ).each(function( i ) { if ( $( this ).is(":valid") ) { $(this).parents("li").addClass("Valid-1"); } else { $(this).parents("li").removeClass("Valid-1"); } }); $( "input[type='text'], textarea" ).each(function( i ) { if ( $( this ).val() ) { $(this).parents("li").addClass("Valid-1"); } else { $(this).parents("li").removeClass("Valid-1"); } }); });

Here's the CSS:

li.gfield input {height:3em;} li.gfield textarea {padding-top:12px;} li.gfield {position:relative;} /* Position label as Placeholder */ li.gfield label {position:absolute; top:15px; left:10px; transition: all 0.2s ease-in-out; } /* If field contains valid data, move label to top */ li.gfield.Focus label, li.gfield.Valid label { opacity:.7; top:0px; font-size:.85em !important; } li.gfield.Focus label, li.gfield.Valid-1 label { opacity:.7; top:0px; font-size:.85em !important; }

Primary Sidebar

Sogwap Sandbox

  • Scroll down after 5 seconds
  • Gravity Forms Radio Buttons
  • GF & Flexbox
  • My Fine Gallery
  • Add Floating menu
  • HTML in Excerpts
  • GF Adaptive Placeholder #2
  • GF Adaptive Placeholder
  • Titles with Tags
  • Test Post
  • Sticky Kit Demo
  • Mobile Menu
  • DK Exit Popup
  • Video in Excerpt
  • Custom Slider Demo
  • Sliding Underline
  • Margin & Padding settings
  • List-Style-Type
  • RCA Calendar
  • BB Test
  • Irregular
  • Full Width Google Map
  • AutoPlay
  • Columns within Columns
  • Post Header
  • Slider / Grid Images
  • BB Gallery Module Sample
  • Parallax Pro Copy
  • Code Sample
  • Test
  • CNI-Slider
  • Dxbee Test
  • BB Shortcode #2
  • BB Shortcode Usage #1
  • Bordered Content
  • Split columns
  • Readmore Placed Over Image
  • Arrow Options
  • Featured Image Special
  • Sticky Menu with Hero image Above
  • Screen Size
  • Welcome to My Sandbox
  • Tab Content II
  • Tab Content
  • Place Hamburger Menu in Header
  • FullPage JS
  • BB 100% Height Demo
  • Adding Image Caption and Description
  • Post Hover Sample
  • Wesley Cavanaugh – Atlanta 1980
  • Image Test 300 x 300 pixels
  • Image Test 1000 x 1000 pixels
  • Responsive Logo Demo
  • Multiple Gallery Images per Row
  • Sidebar Widget Demo
  • Test Post with various Tags
  • Table of Content
  • WP Thickbox
  • Outside Ads
  • Responsive Video
  • Filter Portfolio
  • Online Graphic Resources
  • Full Width Slider
  • Center Content
  • Hello world!

Copyright © 2026 Sogwap Sandbox ยท Log in