Skip to content

Instantly share code, notes, and snippets.

@digitaldesigndj
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitaldesigndj/3982969b5bc3456bf35a to your computer and use it in GitHub Desktop.
Save digitaldesigndj/3982969b5bc3456bf35a to your computer and use it in GitHub Desktop.
Standish New Callouts

This is the commit that added the buttons:

https://bitbucket.org/reapmarketing/new-standish-template/commits/9f043b0333356946623e717c1835e26aeaa17397

Adding the element with JavaScript

The Important Bit:

   $("a.cat:contains(Supplies)").append('<span><i class="icon icon-star"></i> New</span>');
   $("a:contains(Break Room)").append('<span><i class="icon icon-star"></i> New</span>');

Each line adds a "New" element. These target the links a by text content. Notice how Supplies uses the .cat class to speficiy the sidebar.

Styles

Here are the styles, you shouldn't need to change these.

	.navigation ul ul a span,
	.cat span {
		background: #dfe133;
		padding: 2px 5px;
		border-radius: 2px;
		margin-left: 5px;
		color: #696969;
	}
	.navigation ul ul a span {
		position: absolute;
		padding: 2px 2px 0px 2px;
		top: 2px;
	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment