Skip to content

Instantly share code, notes, and snippets.

<?php
//
//
// http://skilleo.me/challenge/6
//
//
function textAnalytics($a) {
/* Create the code to gather the text analytics here. */
$return = "";
// Number of words ----- Need to take one away for some reason, your counter is wrong.
<?php
////////////////////////////////////
// This is my answer to the following
// http://skilleo.me/challenge/2
//
//
// Seems to crash it out =/
////////////////////////////////////
<button class="replybutton" data-origional="123" data-parent="123">Reply</button>
<script>
$('.replybutton').on('click', function(){
$(this).addClass('loading'); // a class that adds a no-repeat right-aligned background of a spinning giff... give it some padding so it appears 'in the button'.
if ($(this).is(":visible")) {
$("#post" + $(this).data("parent")).slideUp();
} else {
$("#post" + $(this).data("parent")).hide();
$("#post" + $(this).data("parent")).load("/reply?parentPost=" + $(this).data("parent") + "&originalPost=" + $(this).data("origional"), function () {
<?
/*
*
*
* ----- Please note, my syntax is constantly evolving as I type this out
* ----- This really is a 10% done thing, in it's conception.
* ----- By the time you're reading this, i've probably changed
* ----- around the code a bit, but it should give you a general
*- ---- idea