Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Focusing

Matheus Gonçalves Murta matheusmurta

👨‍💻
Focusing
Block or report user

Report or block matheusmurta

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matheusmurta
matheusmurta / checkIframe.js
Created Oct 14, 2019
Check if actual window is a iframe
View checkIframe.js
var isInIFrame = (window.location != window.parent.location);
if(isInIFrame==true){
// iframe
}
else {
// no iframe
}
@matheusmurta
matheusmurta / clickclassevent.js
Created Oct 9, 2019
Useful click classes events jquery
View clickclassevent.js
$(window).click(function(e) {
console.log(e); // then e.srcElement.className has the class
});
$('div').click(function() {
var theClass = $(this).attr('class');
alert( theClass );
});
@matheusmurta
matheusmurta / hidewithcssulli.css
Last active Oct 9, 2019
Css hide First itens from ul li list
View hidewithcssulli.css
/*:nth-child(-n+4)*/
.dashboard-widget.big-counter ul.list-inline li:nth-child(2), /this element's 2nd child/
.dashboard-widget.big-counter ul.list-inline li:nth-child(3), /this element's 3rd child/
.dashboard-widget.big-counter ul.list-inline li:nth-child(4) { /this element's 4th child/
display: none !important;
}
@matheusmurta
matheusmurta / hideifcontainstext.js
Created Oct 8, 2019
Jquery hide if contains text
View hideifcontainstext.js
$('#tagCloud li:contains(Item3)').hide();
@matheusmurta
matheusmurta / getelementattr.js
Created Oct 8, 2019
jQuery click on a inside of element and get it's attribute
View getelementattr.js
$(document).on("click", "#nativeLang > ul > li > a", function( event ){
$('#Result').html( $(this).attr("id") );
});
@matheusmurta
matheusmurta / getclassnameclick.js
Created Oct 8, 2019
Jquery Get Class Name Cliked Element
View getclassnameclick.js
$('div').click(function() {
var theClass = this.className; // "this" is the element clicked
alert( theClass );
});
@matheusmurta
matheusmurta / JqueryAppendStyle.js
Last active Oct 8, 2019
Jquery Append Style to head
View JqueryAppendStyle.js
$( "<style>body { #menu-teste {\n"+
" display:block !important;\n"+
" } }</style>" ).appendTo( "head" );
View waitjqueryload.js
<style>
/* Utilize esse template para adicionar novas tags que precisam de utilizar o Jquery */
/* Meu Estilo CSS */
</style>
<script>
/* Meu código JS */
function showContent() {
@matheusmurta
matheusmurta / remove.alert.js
Created Oct 7, 2019
Remove Alert in console
View remove.alert.js
addJS_Node (null, null, overrideSelectNativeJS_Functions);
function overrideSelectNativeJS_Functions () {
window.alert = function alert (message) {
console.log (message);
}
}
function addJS_Node (text, s_URL, funcToRun) {
var D = document;
@matheusmurta
matheusmurta / disable.js
Created Oct 4, 2019
Disable element querySelector
View disable.js
document.querySelector('#myelementy').disabled = true;
You can’t perform that action at this time.