working on it ...

Filters

Explore Public Snippets

Sort by

Found 2,992 snippets matching: hide

    public by wassim modified Oct 22, 2014  196072  0  5  0

    IOS reload data with last update data/time

    how to update the last update date/time and hide the refresh control when the data is loaded in the table.
    
    - (void)reloadData
    {
        // Reload table data
        [self.tableView reloadData];
        
        // End the refreshing
        if (self.refreshControl) {
            
            NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
            [formatter setDateFormat:@"MMM d, h:mm a"];
            NSString *title = [NSString stringWithFormat:@"Last update: %@", [formatter stringFromDate:[NSDate date]]];
            NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:[UIColor whiteColor]
                                                                        forKey:NSForegroundColorAttributeName];
            NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:title attributes:attrsDictionary];
            self.refreshControl.attributedTitle = attributedTitle;
            
            [self.refreshControl endRefreshing];
        }
    }

    public by Fresh-Dev modified Feb 10, 2016  171761  2  3  0

    Hiding H1 for logo

    Hiding H1 for logo: hideH1Logo.css
    h1 {
        text-indent: -9999px;
        margin: 0 auto;
        width: 320px;
        height: 85px;
        background: transparent url("images/logo.png") no-repeat scroll;
    }
    
    

    public by micurs modified Jul 1, 2012  3025  0  7  0

    Javascript Loop To Hide All Flash

    This quick loop disable all object embedded in a web-page. Normally those are flash movies.
    var objects = document.getElementsByTagName('object');
    for (var i=0, n=objects.length;i<n;i++) 
    	objects[i].style.display='none';
    

    public by zonaro modified Oct 29, 2015  1625  3  8  0

    Hide URL Parameters after PageLoad

    Add a StartupScript to the page. This snippet hide the parameters of URL after PageLoad
    Response.Write("<script>setTimeout(function () { history.replaceState({ foo: \"bar\" }, \"RemoveParam\", location.pathname) }, 300);</script>");
                                        

    public by UdeF modified Mar 8, 2015  1308  2  5  0

    Hide everything except some elements on webpage

    Replace placeholder %{item to hide}% with the item.
    function addGlobalStyle(css) {
        var head, style;
        head = document.getElementsByTagName('head')[0];
        if (!head) { return; }
        style = document.createElement('style');
        style.type = 'text/css';
        style.innerHTML = css;
        head.appendChild(style);
    };
     
    //Avoid conflicts
    this.$ = this.jQuery = jQuery.noConflict(true);
    $(document).ready(function()
    {
    /*
        alert("jQuery is loaded");
        $('body > :not(%{item to hide}%) OR :not').hide(); //hide all nodes directly under the body
        $('%{item to hide}%').appendTo('body');
        $( "%{item to hide}%" ).append( "</br>" );
    */  
        $("body > *").hide(); 
        $("%{item to hide}%").show();
        $("%{item to hide}%").appendTo('body');
        $("%{item to hide}%").append( "</br>" );
        // addGlobalStyle('%{item to hide}% { margin: 10px !important; }');
        addGlobalStyle('body { line-height: 1.8 !important; margin: 10px !important; }');
    });           

    public by szmerek modified Aug 20, 2017  93  0  3  0

    Hide element(s) by class

    Some examples for hiding the class.
    //Ex 
    //<div class="appBanner">appbanner</div> 
    
    document.getElementsByClassName('appBanner')[0].style.visibility = 'hidden';
    
    //change the style rules of all elements matching the class
    
    [].forEach.call(document.querySelectorAll('.appBanner'), function (el) {
      el.style.visibility = 'hidden';
    });
    
    //If for...of is available then use
    
    for (let el of document.querySelectorAll('.appBanner')) el.style.visibility = 'hidden';
    
    //And the other one
    
    Array.filter( document.getElementsByClassName('appBanner'), function(elem){ elem.style.visibility = 'hidden'; });
    
    //and the last one
    
    var appBanners = document.getElementsByClassName('appBanner'), i;
    
    for (i = 0; i < appBanners.length; i += 1) {
        appBanners[i].style.display = 'none';
    }																								

    public by LongBeard modified Feb 10, 2016  1793  1  3  0

    Hiding H1 for logo

    Hiding H1 for logo: hideH1Logo.css
    h1 {
        text-indent: -9999px;
        margin: 0 auto;
        width: 320px;
        height: 85px;
        background: transparent url("images/logo.png") no-repeat scroll;
    }
    
    

    public by simonwalker modified Mar 15, 2017  535  7  5  0

    Magento Customer Registration Attributes Extension by FME

    Magento Customer Registration attributes extension by FME allows you to add customer attribute to user registration form & account pages. You can hide the custom attributes and restrict them by creating different customer attributes. Using this Magento add customer attribute extension, you can make the custom registration form attributes mandatory
    // https://www.fmeextensions.com/magento-additional-registration-attributes-fields.html            

    public by msdn modified Jan 12, 2015  122675  0  5  0

    HideOverlayForm

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Drawing;
    using System.Data;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;
    using System.Diagnostics;
    
    static OverlayForm form;
    
    public static void HideOverlayForm()
    {
        if (form != null)
        {
            if (form.Visible)
            {
                form.Hide();
            }
        }
    }

    public by msdn modified Jan 12, 2015  1012  0  6  0

    HideCaret

    using System;
    using System.Collections.Concurrent;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Reflection;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Threading;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Linq;
    using Microsoft.ServiceBus;
    using Microsoft.ServiceBus.Messaging;
    
    private static readonly MethodInfo checkpointMethodInfo;
    
    static PartitionListenerControl()
            {
                var type = typeof (EventHubReceiver);
                checkpointMethodInfo = type.GetMethods(BindingFlags.Instance | BindingFlags.NonPublic)
                    .FirstOrDefault(p => string.Compare("Checkpoint", p.Name, StringComparison.OrdinalIgnoreCase) == 0);
            }
    
    #region DllImports
    [DllImport("user32.dll")]
    static extern bool HideCaret(IntPtr hWnd);
    • Public Snippets
    • Channels Snippets