Posts by Ericki • 515 points
21 posts
-
4
votes0
answers38
viewsQ: What is the best way to implement Schema in HTML?
Giving a search on the internet I saw that Google recommends the implementation of Schema via JSON/LD. As much as I’ve done a lot of research, I haven’t found any answers that specific. My first…
-
0
votes3
answers496
viewsQ: How to change Columns display order?
I got the following: .container{columns:3;} span{width:100%;display:inline-block;width:100px;background-color:red;margin-bottom:10px} <div class='container'> <span…
-
-1
votes2
answers104
viewsQ: Replace multiple word Ivs
Supposing I did have: <div class='datas'> <span>01-01-2019</span> <span>01-02-2019</span> </div> <div class='datas'> <span>01-03-2019</span>…
-
0
votes2
answers158
viewsQ: Take element from a string
Supposing I did have: <script> var string = "Hello [background]image.png[background] World!"; </script> It would be possible to find the image that is inside the two [background], and…
-
1
votes1
answer29
viewsQ: Help with search
I have a simple search field below, which when used returns with a link similar to:meusite.com/search?q=minhabusca. I need him to come back like…
-
0
votes1
answer37
viewsQ: Any reason pro removeClass() doesn’t work?
You see, everything is working as expected, except removeClass at the end of the script. It simply refuses to remove the class. Something is wrong? $(document).ready(function() { var cheight =…
-
1
votes2
answers47
viewsQ: How to add class to specific elements?
I have the following: <figure class="itemImage"> <span title="Camiseta preta O Poderoso Chefão"…
-
1
votes1
answer111
viewsQ: Limit characters and display points
I have the following code: if (i.link[E].href == "teste") { var u = i.link[E].type.substring(0,130) + "..."; } It limits the characters to 130, and displays the three dots at the end of the text.…
-
-4
votes2
answers39
viewsQ: Image is not displayed when reloading the page
My code makes when I scroll down, the logo is shown. And when I scroll back, it hides. It happens that when I’m in the middle of the page, with it active, and I restart the page - refresh - the…
javascriptasked Ericki 515 -
1
votes1
answer83
viewsQ: Limit characters in div and display points only if necessary?
I got the following: $("h2").text(function(index, currentText) { return currentText.substr(0, 100) + '...'; }); It limits the text of the H2 tag to 100 characters and displays the three dots at the…
-
0
votes1
answer75
viewsQ: View categories of each post via JSON JS
I’m using the blogger, and I need to "generate" the categories of each post. function posts(json) { for (var i = 0; i < 11; i++) { var post = json.feed.entry[i]; var postLabels = []; } for (var b…
-
8
votes1
answer1709
viewsQ: Div height 100% in div height auto?
I will try to be very explanatory. I have the structure of a common site as you can see in the html below. And I want the height of the sidebar to increase as the height of the container next to it.…
-
0
votes1
answer25
viewsQ: Help with JS code
I have that code: if(post.link[k].type == 'post miniatura'){ var postMiniatura = post.link[k].href; } else { var postImage; try { postImage = post.media$image.url } catch (error) { s =…
javascriptasked Ericki 515 -
1
votes3
answers2005
viewsQ: Picking up content within multiple Ivs
You need to take the contents of several div’s with equal classes. For example: <div class='conteudo'> <li>Conteúdo 1</li> </div> <div class='conteudo'>…
-
0
votes3
answers4104
viewsQ: Auto height in iframe?
I have an iframe and I need its height to be automatic according to the content inside it. How can I do that? No jquery of preference.
-
4
votes2
answers87
viewsQ: Scroll down when restarting with JS
I was hoping that when the page was uploaded, it would automatically go to the end of the page. I don’t want to use jquery because the project is relatively simple. It’s not necessary. I used the…
javascriptasked Ericki 515 -
3
votes4
answers94
viewsQ: What’s wrong with this Javascript code?
I wanted to add the class tab-active to all the tags span of the div menuMobileTabs. What’s wrong with it? <div id='menuMobileTabs'> <span>Sidebar</span>…
javascriptasked Ericki 515 -
1
votes2
answers7745
viewsQ: How to check if an element has a class, or is with an "active" class
I used the .toggleClass() in a div, after clicking on a button, activate the class "menu-active", if clicked again, it removes it. So far so good. Only now beyond that, I need something to check…
-
5
votes2
answers273
viewsQ: .after() jquery on JS Pure?
In jquery: $( "#main article:nth-child(3)" ).after( "<div style='clear:both;/>" ); How would I look in pure JS?
javascriptasked Ericki 515 -
2
votes1
answer419
viewsQ: How to change style in pure javascript?
In jquery: <script> $( "#main article:nth-child(3) .postSnippet" ).css("display", "block"); </script> How would I look in pure JS?
javascriptasked Ericki 515 -
3
votes1
answer1444
viewsQ: Add CSS to specific page via JS
I’m currently using Blogger, and I want to add css styles to just one specific page. I used a while ago a standard code from the blogger himself that allowed this (), but it doesn’t work anymore. So…