Skip to content

Instantly share code, notes, and snippets.


Sara Soueidan SaraSoueidan

View GitHub Profile
SaraSoueidan / Simulate Click event in Vanilla JS.js
Created Sep 7, 2018
Vanilla JS .click() doesn't apply to links <a>, so this is a function that enables it to work on them. Source:
View Simulate Click event in Vanilla JS.js
* Simulate a click event.
* @public
* @param {Element} elem the element to simulate a click on
var simulateClick = function (elem) {
// Create our event (with options)
var evt = new MouseEvent('click', {
bubbles: true,
cancelable: true,
View Event

Event Name:



Talk topic:

View gist:7915280

Moving from jQuery


// jQuery
$(document).ready(function() {
  // code
View Simple-Circular-Menu.markdown
View HTML5-paste-image-to-page.markdown

HTML5 paste image to page

Using a simpel javascript code found on I have made simpel demo showing how you can paste images on the computer clipboard into HTML elements and save their info as dataURL

A Pen by Sten Hougaard on CodePen.


SaraSoueidan / index.html
Created Aug 11, 2013
A CodePen by Sara Soueidan. Tumblr's Like/Unlike Animation with CSS3 animaitons - Make sure u got the latest version of Chrome. Also works in Firefox.
View index.html
<h2>Click the heart to like/unlike</h2>
<div class="heart"></div>
View placeholder-mixin
@mixin placeholder-color($color){
color: $color
color: $color
SaraSoueidan / scrollbar-mixin
Created Jul 26, 2013
Sass mixin for styling scrollbars in webkit by Hugo Giraudel (
View scrollbar-mixin
* Mixin scrollbar
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) {
::-webkit-scrollbar {
width: $size;
height: $size;
::-webkit-scrollbar-thumb {
View long-shadow-mixin
@function makelongshadow($color) {
$val: 0px 0px $color;
@for $i from 1 through 200 {
$val: #{$val}, #{$i}px #{$i}px #{$color};
@return $val;
@mixin longshadow($color) {
text-shadow: makelongshadow($color);
SaraSoueidan / gist:6048686
Created Jul 21, 2013 — forked from devongovett/gist:1381839
Javascript classList shim for IE9 (it's only supported in IE10+)
View gist:6048686
* Minimal classList shim for IE 9
* By Devon Govett
if (!("classList" in document.documentElement) && Object.defineProperty && typeof HTMLElement !== 'undefined') {
Object.defineProperty(HTMLElement.prototype, 'classList', {
get: function() {
You can’t perform that action at this time.