Mutation Observer Not Detecting Text Change

It’s because textContent triggers a different change than innerHTML, and your observer configuration is not configured to observe the changes made by textContent. textContent changes the child text node of the target. According to MDN setting textContent: Setting this property on a node removes all of its children and replaces them with a single text … Read more

jQuery recursive iteration over objects

The .find(‘selector’) method is basically a recusive version of .children(), and will find any descendant object that matched the selector, as opposed to .children() which only finds objects in the first level of descendants. 2nd EDIT (I phrased badly the first time, and messed up the code a bit!): Ok, I don’t think this functionality … Read more

Detect if an alert or confirm is displayed on a page

If you wanted to run some code when an alert() fires, you could try something like this: I’ve only tested in Chrome, so I’m not sure about browser support. Example: http://jsfiddle.net/Q785x/1/ (function() { var _old_alert = window.alert; window.alert = function() { // run some code when the alert pops up document.body.innerHTML += “<br>alerting”; _old_alert.apply(window,arguments); // … Read more

Dynamically load google fonts after page has loaded

Check out the WebFont.load command in this github repo: https://github.com/typekit/webfontloader You can load whatever font you want dynamically: <script src=”http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js”></script> <script> WebFont.load({ google: { families: [‘Droid Sans’, ‘Droid Serif’] } }); </script>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)