Ricerche recenti
Nessuna ricerca recente

Rob Levin
Data ingresso 16 apr 2021
·
Ultima attività 27 ott 2021
Seguiti
0
Follower
0
Attività totali
5
Voti
0
Abbonamenti
3
PANORAMICA ATTIVITÀ
BADGE
ARTICOLI
POST
COMMENTI NELLA COMMUNITY
COMMENTI AGLI ARTICOLI
PANORAMICA ATTIVITÀ
Ultima attività di Rob Levin
Rob Levin ha commentato,
I'm cross posting this as I think the js solution is bloated and fragile. Just use CSS:
.recent-activity-item:nth-of-type(1n+4) {display: none;}
Of course I'm using the list item class for recent activity items, but this will work with any of 'em. The 1n+4 just say "for any of these item types from 4 on, kick in the following code".
Visualizza commento · Data ultimo post: 06 apr 2016 · Rob Levin
0
Follower
0
Voti
0
Commenti
Rob Levin ha commentato,
There are several pages that come up regarding this search-box customization and I really felt that the information does not address that if you jquery in the customized placeholder text on document ready, there's a flash of the default 'Search'. My solution was to hide it initially and add a 'loaded class then unhide it. There's a bunch of extra CSS in there but you should be able to get the general approach (and no longer have a flash of unwanted text!):
/* Hide initially */
input::-webkit-input-placeholder { color:transparent; }
input::-moz-placeholder { color:transparent; }
input::-moz-placeholder { color:transparent; }
input::-ms-input-placeholder { color:transparent; }
/* when we've added the .loaded class we kick in the opaque placeholder */
input.loaded::-webkit-input-placeholder {
color: $color_3;
opacity: .5;
transition: opacity 0.35s ease;
}
input.loaded::-moz-placeholder {
color: $color_3;
opacity: .5;
transition: opacity 0.35s ease;
}
input.loaded::-moz-placeholder {
color: $color_3;
opacity: .5;
transition: opacity 0.35s ease;
}
input.loaded::-ms-input-placeholder { color:transparent; }
input:focus::-webkit-input-placeholder {
opacity: 1;
}
input:focus:-ms-input-placeholder {
color: 1;
}
input:focus::-moz-placeholder {
opacity: 1;
}
Here's my javscript (within document ready as stated above already):
$('#query').attr('placeholder',"Have a question? Search our knowledge base the answer…").attr('autocomplete', 'off');
//Signify that we can unhide the placeholder
$('#query').addClass('loaded');
Visualizza commento · Data ultimo post: 10 nov 2015 · Rob Levin
0
Follower
0
Voti
0
Commenti