how to include video in jekyll markdown blog

You should be able to put the HTML for embedding directly into your markdown. Under the video, there is a “Share” button, click on this, and then the “Embed” button, which should give you something that looks a little like: <iframe width=”420″ height=”315″ src=”http://www.youtube.com/embed/dQw4w9WgXcQ” frameborder=”0″ allowfullscreen></iframe> Just copy and paste that into your post, the … Read more

Highlight selected node, its links, and its children in a D3 force directed graph

The error is because you are selecting the data objects (d.source and d.target) rather than the DOM elements associated with those data objects. You’ve got the line highlighting working, but I would probably combine your code into a single iteration, like this: link.style(“opacity”, function(o) { return o.source === d || o.target === d ? 1 … Read more

Select a complete table with Javascript (to be copied to clipboard)

Yes. It’s not too tricky, and the following will work in all mainstream browsers (including IE 6, and indeed 5): (Updated 7 September 2012 after Jukka Korpela’s comment pointing out that the previous version didn’t work in IE 9 standards mode) Demo: http://jsfiddle.net/timdown/hGkGp/749/ Code: function selectElementContents(el) { var body = document.body, range, sel; if (document.createRange … Read more

Javascript: How to detect if a word is highlighted

The easiest way to do this is to detect mouseup and keyup events on the document and check whether any text is selected. The following will work in all major browsers. Example: http://www.jsfiddle.net/timdown/SW54T/ function getSelectedText() { var text = “”; if (typeof window.getSelection != “undefined”) { text = window.getSelection().toString(); } else if (typeof document.selection != … Read more

jQuery “blinking highlight” effect on div?

jQuery UI Highlight Effect is what you’re looking for. $(“div”).click(function () { $(this).effect(“highlight”, {}, 3000); }); The documentation and demo can be found here Edit: Maybe the jQuery UI Pulsate Effect is more appropriate, see here Edit #2: To adjust the opacity you could do this: $(“div”).click(function() { // do fading 3 times for(i=0;i<3;i++) { … Read more

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