Skip to content

Instantly share code, notes, and snippets.

View EmmanuelObua's full-sized avatar
🏠
Working from home

Emmanuel Obua EmmanuelObua

🏠
Working from home
View GitHub Profile
/**
* Add this at the end of jQueryClone.js file to export the $ function
* Check if we are using modules and export the $ function else attach it to the window object
*/
if (typeof exports != "undefined") {
exports.$ = $;
} else {
window.$ = $
}
@EmmanuelObua
EmmanuelObua / npm-login-and-publish.js
Last active June 20, 2021 09:14
Instructions to publish to NPM
// Login in your terminal in the root directory.
npm login
//Now we are ready to publish our library.
npm publish
//Now install in any project for use.
npm i customised-jquery-obuae --save
//USAGE
@EmmanuelObua
EmmanuelObua / package.json
Created June 20, 2021 06:28
Package json file for uploading to NPM
{
"name": "customised-jquery-obuae",
"version": "1.0.0",
"description": "This is a customised jquery library with extra features for manipulating the DOM elements",
"main": "jQueryClone.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
@EmmanuelObua
EmmanuelObua / jQueryClone.js
Last active June 12, 2021 16:42
jQuery Clone Global File
/**
* The $ function
* It takes in a param which can either be a string like class selector .active or
* an element selector like div
* @param param
* @returns ElementCollection
*
*/
function $(param) {
@EmmanuelObua
EmmanuelObua / index.html
Last active June 12, 2021 10:11
Index file jQuery Clone
<!DOCTYPE html>
<html>
<head>
<title>JQSlider</title>
<link rel="stylesheet" href="css/style.css">
<!--
@EmmanuelObua
EmmanuelObua / main.js
Last active June 12, 2021 16:17
Main JS jQuery Clone
/**
* Select the document then call the ready function which then checks if DOM content is loaded,
* then executes the callback.
*/
$(document)
.ready(function () {
$(document)
.on("click", ".next", function () {
@EmmanuelObua
EmmanuelObua / style.css
Last active June 12, 2021 16:13
Our global css jQuery Clone
/* Set the background and color of text on the body */
body {
font-family: "Arial",sans-serif;
font-size: 14px;
color: #fff;
background: #333;
}
/* Color all the anchor tags white and remove default text-decoration of underlining */
a {
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use App\User;
use App\Profile;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
@EmmanuelObua
EmmanuelObua / user-post-relationship.php
Created May 14, 2021 09:30
User post relationship
<?php
/**
* User
*
* @author Obua Emmanuel <eobua6882@gmail.com>
* @copyright 2021 Obua Emmanuel
* @link http://emmanuelobua.me
* @version 1.0.0
*
@EmmanuelObua
EmmanuelObua / profile.blade.php
Last active May 13, 2021 14:05
Profile blade
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Dashboard') }}</div>