{"id":452,"date":"2023-06-15T11:01:14","date_gmt":"2023-06-15T14:01:14","guid":{"rendered":"https:\/\/www.ctasoftware.com.br\/blog\/?p=452"},"modified":"2023-06-15T11:01:19","modified_gmt":"2023-06-15T14:01:19","slug":"jquery-definir-display-block-ou-none-na-div","status":"publish","type":"post","link":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/","title":{"rendered":"jQuery definir display block ou none na DIV"},"content":{"rendered":"\n<p>Para alterar a exibi\u00e7\u00e3o da DIV que est\u00e1 como display: none para display block utilizando jQuery utilize:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$(\"#id\").css(\"display\", \"block\");<\/code><\/pre>\n\n\n\n<p>Para remover o block e esconder a DIV utilize<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$(\"#id\").css(\"display\", \"none\");<\/code><\/pre>\n\n\n\n<p>e \u00e9 s\u00f3!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Para alterar a exibi\u00e7\u00e3o da DIV que est\u00e1 como display: none para display block utilizando jQuery utilize: Para remover o block e esconder a DIV utilize e \u00e9 s\u00f3!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[52,55],"tags":[29],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>jQuery definir display block ou none na DIV - CTASoftware Blog<\/title>\n<meta name=\"description\" content=\"CTASoftware Blog jQuery definir display block ou none na DIV JQuery\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"jQuery definir display block ou none na DIV - CTASoftware Blog\" \/>\n<meta property=\"og:description\" content=\"CTASoftware Blog jQuery definir display block ou none na DIV JQuery\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/\" \/>\n<meta property=\"og:site_name\" content=\"CTASoftware Blog\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-15T14:01:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-15T14:01:19+00:00\" \/>\n<meta name=\"author\" content=\"Everton Gon\u00e7alves\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Everton Gon\u00e7alves\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/\"},\"author\":{\"name\":\"Everton Gon\u00e7alves\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/person\/34f7fa2c76834d8410f6dd43e26fd3e4\"},\"headline\":\"jQuery definir display block ou none na DIV\",\"datePublished\":\"2023-06-15T14:01:14+00:00\",\"dateModified\":\"2023-06-15T14:01:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/\"},\"wordCount\":37,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#organization\"},\"keywords\":[\"Jquery\"],\"articleSection\":[\"JavaScript\",\"JQuery\"],\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/\",\"url\":\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/\",\"name\":\"jQuery definir display block ou none na DIV - CTASoftware Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#website\"},\"datePublished\":\"2023-06-15T14:01:14+00:00\",\"dateModified\":\"2023-06-15T14:01:19+00:00\",\"description\":\"CTASoftware Blog jQuery definir display block ou none na DIV JQuery\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/www.ctasoftware.com.br\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"jQuery definir display block ou none na DIV\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#website\",\"url\":\"https:\/\/www.ctasoftware.com.br\/blog\/\",\"name\":\"CTASoftware Blog\",\"description\":\"Para Desenvolvedores De Software\",\"publisher\":{\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ctasoftware.com.br\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#organization\",\"name\":\"CTASoftware\",\"url\":\"https:\/\/www.ctasoftware.com.br\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.ctasoftware.com.br\/blog\/wp-content\/uploads\/2023\/06\/logocta.png?fit=225%2C44&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.ctasoftware.com.br\/blog\/wp-content\/uploads\/2023\/06\/logocta.png?fit=225%2C44&ssl=1\",\"width\":225,\"height\":44,\"caption\":\"CTASoftware\"},\"image\":{\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/person\/34f7fa2c76834d8410f6dd43e26fd3e4\",\"name\":\"Everton Gon\u00e7alves\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3e5e7fe964521f618a2b09d3fbb7800f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3e5e7fe964521f618a2b09d3fbb7800f?s=96&d=mm&r=g\",\"caption\":\"Everton Gon\u00e7alves\"},\"description\":\"http:\/\/www.ctasoftware.com.br\",\"sameAs\":[\"http:\/\/www.ctasoftware.com.br\"],\"url\":\"https:\/\/www.ctasoftware.com.br\/blog\/author\/everton-goncalves\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"jQuery definir display block ou none na DIV - CTASoftware Blog","description":"CTASoftware Blog jQuery definir display block ou none na DIV JQuery","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/","og_locale":"pt_BR","og_type":"article","og_title":"jQuery definir display block ou none na DIV - CTASoftware Blog","og_description":"CTASoftware Blog jQuery definir display block ou none na DIV JQuery","og_url":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/","og_site_name":"CTASoftware Blog","article_published_time":"2023-06-15T14:01:14+00:00","article_modified_time":"2023-06-15T14:01:19+00:00","author":"Everton Gon\u00e7alves","twitter_misc":{"Escrito por":"Everton Gon\u00e7alves","Est. tempo de leitura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#article","isPartOf":{"@id":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/"},"author":{"name":"Everton Gon\u00e7alves","@id":"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/person\/34f7fa2c76834d8410f6dd43e26fd3e4"},"headline":"jQuery definir display block ou none na DIV","datePublished":"2023-06-15T14:01:14+00:00","dateModified":"2023-06-15T14:01:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/"},"wordCount":37,"commentCount":0,"publisher":{"@id":"https:\/\/www.ctasoftware.com.br\/blog\/#organization"},"keywords":["Jquery"],"articleSection":["JavaScript","JQuery"],"inLanguage":"pt-BR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/","url":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/","name":"jQuery definir display block ou none na DIV - CTASoftware Blog","isPartOf":{"@id":"https:\/\/www.ctasoftware.com.br\/blog\/#website"},"datePublished":"2023-06-15T14:01:14+00:00","dateModified":"2023-06-15T14:01:19+00:00","description":"CTASoftware Blog jQuery definir display block ou none na DIV JQuery","breadcrumb":{"@id":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.ctasoftware.com.br\/blog\/jquery-definir-display-block-ou-none-na-div\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/www.ctasoftware.com.br\/blog\/"},{"@type":"ListItem","position":2,"name":"jQuery definir display block ou none na DIV"}]},{"@type":"WebSite","@id":"https:\/\/www.ctasoftware.com.br\/blog\/#website","url":"https:\/\/www.ctasoftware.com.br\/blog\/","name":"CTASoftware Blog","description":"Para Desenvolvedores De Software","publisher":{"@id":"https:\/\/www.ctasoftware.com.br\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ctasoftware.com.br\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-BR"},{"@type":"Organization","@id":"https:\/\/www.ctasoftware.com.br\/blog\/#organization","name":"CTASoftware","url":"https:\/\/www.ctasoftware.com.br\/blog\/","logo":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.ctasoftware.com.br\/blog\/wp-content\/uploads\/2023\/06\/logocta.png?fit=225%2C44&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.ctasoftware.com.br\/blog\/wp-content\/uploads\/2023\/06\/logocta.png?fit=225%2C44&ssl=1","width":225,"height":44,"caption":"CTASoftware"},"image":{"@id":"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/person\/34f7fa2c76834d8410f6dd43e26fd3e4","name":"Everton Gon\u00e7alves","image":{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/www.ctasoftware.com.br\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3e5e7fe964521f618a2b09d3fbb7800f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3e5e7fe964521f618a2b09d3fbb7800f?s=96&d=mm&r=g","caption":"Everton Gon\u00e7alves"},"description":"http:\/\/www.ctasoftware.com.br","sameAs":["http:\/\/www.ctasoftware.com.br"],"url":"https:\/\/www.ctasoftware.com.br\/blog\/author\/everton-goncalves\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6ACmG-7i","jetpack-related-posts":[{"id":317,"url":"https:\/\/www.ctasoftware.com.br\/blog\/alterar-input-file-por-imagem\/","url_meta":{"origin":452,"position":0},"title":"Alterar Input File por Imagem","author":"Everton Gon\u00e7alves","date":"22 de dezembro de 2017","format":false,"excerpt":"O css e html abaixo alteram o padr\u00e3o do input file para uma imagem. css [css] .image-upload > input { display: none; } [\/css] HTML [html] [\/html] Resultado Simples assim...","rel":"","context":"Em &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/www.ctasoftware.com.br\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":220,"url":"https:\/\/www.ctasoftware.com.br\/blog\/remover-div-pelo-texto-ou-title\/","url_meta":{"origin":452,"position":1},"title":"Remover DIV pelo texto ou title","author":"Everton Gon\u00e7alves","date":"13 de abril de 2017","format":false,"excerpt":"Simples forma de remover uma div pelo text ou title. [js] $(\"[title='Criar novo site de projeto']\").remove(); $(\"[text='Criar novo site de projeto']\").remove(); [\/js]","rel":"","context":"Em &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/www.ctasoftware.com.br\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":270,"url":"https:\/\/www.ctasoftware.com.br\/blog\/converter-campos-formulario-sharepoint-em-label\/","url_meta":{"origin":452,"position":2},"title":"Converter Campos Formul\u00e1rio SharePoint em Label","author":"Everton Gon\u00e7alves","date":"9 de agosto de 2017","format":false,"excerpt":"Para desabilitar alguns campos do nosso formul\u00e1rio de Inclus\u00e3o ou Altera\u00e7\u00e3o SharePoint 2013 em Label podemos executar a a\u00e7\u00e3o abaixo. [js] var camposDesabilitar = ['Title_', 'TipoComunicacao_', 'Observacoes_']; for(var tEFields = 0; tEFields < camposDesabilitar.length; tEFields++){ ConvertTextboxToLable(camposDesabilitar[tEFields]); } function ConvertTextboxToLable(colName) { var txtHTML = $('[id^=\"'+ colName +'\"]').val(); var tdColumn = $('[id^=\"'+\u2026","rel":"","context":"Em &quot;JQuery&quot;","block_context":{"text":"JQuery","link":"https:\/\/www.ctasoftware.com.br\/blog\/category\/jquery\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":279,"url":"https:\/\/www.ctasoftware.com.br\/blog\/consulta-outra-lista-ajax-sharepoint\/","url_meta":{"origin":452,"position":3},"title":"Consulta Outra Lista Ajax SharePoint","author":"Everton Gon\u00e7alves","date":"22 de agosto de 2017","format":false,"excerpt":"Consultando em outra lista e montando uma tabela atrav\u00e9s de AJAX\/Jquery SharePoint. No exemplo abaixo mostro como pesquisar na lista Projetos e exibir em uma div HTML. Filtro pelo status \"Em andamento\" e ordeno pela data de cria\u00e7\u00e3o do item. [js] function Projetos(){ var urlSite = _spPageContextInfo.siteAbsoluteUrl; var obj; var\u2026","rel":"","context":"Em &quot;SharePoint&quot;","block_context":{"text":"SharePoint","link":"https:\/\/www.ctasoftware.com.br\/blog\/category\/sharepoint\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":410,"url":"https:\/\/www.ctasoftware.com.br\/blog\/criar-dropdown-com-jquery-select-option\/","url_meta":{"origin":452,"position":4},"title":"Criar dropdown com jQuery (select option)","author":"Everton Gon\u00e7alves","date":"4 de agosto de 2020","format":false,"excerpt":"De forma simples e r\u00e1pida \u00e9 poss\u00edvel criar um input select utilizando o jQuery. Pode ser feito da seguinte maneira... $('#id-input-select-option').empty(); $('#id-input-select-option').append('Selecione'); jQuery.each(driverList, function () { $('', { 'value': this.id, 'text': this.name }).appendTo('#id-input-select-option'); }); At\u00e9 a pr\u00f3xima! Para aprender um pouco mais sobre jQuery recomendo o curso","rel":"","context":"Em &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/www.ctasoftware.com.br\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":296,"url":"https:\/\/www.ctasoftware.com.br\/blog\/obtem-anexos-de-lista-sharepoint\/","url_meta":{"origin":452,"position":5},"title":"Obt\u00e9m anexos de Lista SharePoint","author":"Everton Gon\u00e7alves","date":"12 de setembro de 2017","format":false,"excerpt":"Function para obter a lista de anexos de uma lista no SharePoint. [js] function ObtemAnexos(listItem) { var ctx = listItem.get_context(); var attachmentFolderUrl = String.format('{0}\/Attachments\/{1}',listItem.get_fieldValues()['FileDirRef'],listItem.get_fieldValues()['ID']); var folder = ctx.get_web().getFolderByServerRelativeUrl(attachmentFolderUrl); var files = folder.get_files(); ctx.load(files); ctx.executeQueryAsync( function () { var attachments = []; for (var i = 0; file = files.get_item(i) ;\u2026","rel":"","context":"Em &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/www.ctasoftware.com.br\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/posts\/452"}],"collection":[{"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":1,"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions"}],"predecessor-version":[{"id":453,"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/posts\/452\/revisions\/453"}],"wp:attachment":[{"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/media?parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/categories?post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ctasoftware.com.br\/blog\/wp-json\/wp\/v2\/tags?post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}