Deprecated: Creation of dynamic property wpdb::$categories is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$post2cat is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/wp-db.php on line 760

Deprecated: Creation of dynamic property wpdb::$link2cat is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/wp-db.php on line 760

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/achieve/public_html/knowledgebase/wp-includes/comment-template.php on line 1747

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/achieve/public_html/knowledgebase/wp-content/plugins/contact-form-7/includes/mail.php on line 109

Warning: The magic method GADWP_Manager::__wakeup() must have public visibility in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/gadwp.php on line 76

Deprecated: Optional parameter $filter declared before required parameter $metric is implicitly treated as a required parameter in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php on line 539

Deprecated: Optional parameter $filter declared before required parameter $metric is implicitly treated as a required parameter in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php on line 569

Deprecated: Optional parameter $filter declared before required parameter $metric is implicitly treated as a required parameter in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php on line 601

Deprecated: Optional parameter $filter declared before required parameter $metric is implicitly treated as a required parameter in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php on line 635

Deprecated: Optional parameter $filter declared before required parameter $metric is implicitly treated as a required parameter in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php on line 670

Deprecated: Optional parameter $filter declared before required parameter $metric is implicitly treated as a required parameter in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php on line 729

Deprecated: Optional parameter $filter declared before required parameter $metric is implicitly treated as a required parameter in /home3/achieve/public_html/knowledgebase/wp-content/plugins/google-analytics-dashboard-for-wp/tools/gapi.php on line 769

Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/streams.php on line 26

Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/streams.php on line 29

Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/streams.php on line 160

Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/translations.php on line 292

Deprecated: Creation of dynamic property POMO_FileReader::$is_overloaded is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/streams.php on line 26

Deprecated: Creation of dynamic property POMO_FileReader::$_pos is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/streams.php on line 29

Deprecated: Creation of dynamic property POMO_FileReader::$_f is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/streams.php on line 160

Deprecated: Creation of dynamic property MO::$_gettext_select_plural_form is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/pomo/translations.php on line 292

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-block-type.php on line 391

Deprecated: Creation of dynamic property WP_Block_Type::$skip_inner_blocks is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-block-type.php on line 391

Deprecated: Return type of Requests_Cookie_Jar::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Cookie/Jar.php on line 63

Deprecated: Return type of Requests_Cookie_Jar::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Cookie/Jar.php on line 73

Deprecated: Return type of Requests_Cookie_Jar::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Cookie/Jar.php on line 89

Deprecated: Return type of Requests_Cookie_Jar::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Cookie/Jar.php on line 102

Deprecated: Return type of Requests_Cookie_Jar::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Cookie/Jar.php on line 111

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 40

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 51

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 68

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 82

Deprecated: Return type of Requests_Utility_CaseInsensitiveDictionary::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home3/achieve/public_html/knowledgebase/wp-includes/Requests/Utility/CaseInsensitiveDictionary.php on line 91

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Deprecated: Creation of dynamic property WP_Term::$object_id is deprecated in /home3/achieve/public_html/knowledgebase/wp-includes/class-wp-term-query.php on line 1118

Warning: Cannot modify header information - headers already sent by (output started at /home3/achieve/public_html/knowledgebase/wp-includes/wp-db.php:760) in /home3/achieve/public_html/knowledgebase/wp-includes/feed-rss2.php on line 8
Other – Knowledge http://knowledge.achieveee.com Wed, 11 Oct 2017 14:01:53 +0000 en-US hourly 1 https://wordpress.org/?v=6.0.7 http://knowledge.achieveee.com/wp-content/uploads/2016/05/cropped-favicon-32x32.png Other – Knowledge http://knowledge.achieveee.com 32 32 Send files, images, documents via AJAX http://knowledge.achieveee.com/knowledge_base/send-files-images-documents-via-ajax/ http://knowledge.achieveee.com/knowledge_base/send-files-images-documents-via-ajax/#respond Wed, 11 Oct 2017 14:01:53 +0000 http://knowledge.achieveee.com/?post_type=knowledge_base&p=2540 HTML:

<!DOCTYPE html>
<html lang="en">
	<head>
		<title>User Form</title>
	</head>
	<body>
		<input type="hidden" name="user_id" value="1">
		<form name="user-form" id="user-form" enctype="multipart/form-data">
			<input type="file" name="image_file">
			<input type="text" name="name">
			<button type="button" title="Save" id="save-user">Save</button>
		</form>
	</body>
</html>

JavaScript:

$("#save-user").on("click", function() {
	var user_form = $(this).closest("#user-form");
	var details = new FormData($(user_form)[0]);

	// you can also append any custom paramter to form data, if not skip these
	// details.append('user_id', $('body').find('[name="user_id"]').val());

	$.ajax({
		type: 'POST',
		url: '/save-document',
		data: details,
		processData: false,
		contentType: false,
		success: function(data) {
			console.log("user updated successfully");
		},
		error: function(e) {
			console.log("error");
		}
	});
});

 

]]>
http://knowledge.achieveee.com/knowledge_base/send-files-images-documents-via-ajax/feed/ 0
Responsive Modal LightBox with CSS & JS (no plugins) http://knowledge.achieveee.com/knowledge_base/responsive-modal-lightbox-with-css-js-no-plugins/ http://knowledge.achieveee.com/knowledge_base/responsive-modal-lightbox-with-css-js-no-plugins/#respond Fri, 14 Jul 2017 07:27:42 +0000 http://knowledge.achieveee.com/?post_type=knowledge_base&p=2526 Learn how to create responsive LightBox, click image to zoom with CSS and JS

HTML (Add this code at the end of body):

<div id="fancybox" class="modal" style="display: none;">
	<span class="fancybox-close">&times;</span>
	<img class="fancybox-content" id="fancybox-img">
	<div id="fancybox-caption"></div>
</div>

CSS:

/* Fancybox */
.fancyimg {
	border-radius: 5px;
	cursor: pointer;
	transition: 0.3s;
}

.fancyimg:hover {opacity: 0.7;}

/* The Modal (background) */
#fancybox {
	position: fixed; /* Stay in place */
	z-index: 1; /* Sit on top */
	padding: 20px; /* Location of the box */
	left: 0;
	top: 0;
	width: 100%; /* Full width */
	height: 100%; /* Full height */
	overflow: auto; /* Enable scroll if needed */
	background-color: rgb(0,0,0); /* Fallback color */
	background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

/* Modal Content (Image) */
.fancybox-content {
	margin: auto;
	display: block;
	width: 100%;
	max-width: 900px;
}

/* Caption of Modal Image (Image Text) - Same Width as the Image */
#fancybox-caption {
	margin: auto;
	display: block;
	width: 80%;
	max-width: 700px;
	text-align: center;
	color: #ccc;
	padding: 10px 0;
	height: 40px;
}

/* Add Animation - Zoom in the Modal */
.fancybox-content, #fancybox-caption { 
	-webkit-animation-name: zoom;
	-webkit-animation-duration: 0.6s;
	animation-name: zoom;
	animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
	from {-webkit-transform:scale(0)} 
	to {-webkit-transform:scale(1)}
}

@keyframes zoom {
	from {transform:scale(0)} 
	to {transform:scale(1)}
}

/* The Close Button */
.fancybox-close {
	position: absolute;
	top: 15px;
	right: 35px;
	color: #f1f1f1;
	font-size: 40px;
	font-weight: bold;
	transition: 0.3s;
}

.fancybox-close:hover,
.fancybox-close:focus {
	color: #bbb;
	text-decoration: none;
	cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
	.fancybox-content {
		width: 100%;
	}
}
/* FancyBox end */

JS:

$("img.fancyimg").on("click", function() {
	var img_src = $(this).attr("data-big");
	var img_src = img_src ? img_src : $(this).attr("src");
	$("#fancybox").show();
	$("#fancybox-img").attr("src", img_src);
	$("#fancybox-caption").html($(this).attr("alt"));
});


$(".fancybox-close").on("click", function() {
	$("#fancybox").hide();
});

Configuration, Just one 😉

  1. Add ‘class=”fancyimg”‘ to the img tag you wanna click and zoom

P.S.: You can also show large image by setting data attribute: data-big=”/big-img-path”

That’s it, you’re good to go with LightBox built with CSS & Javascript without using any plugins. Enjoy 🙂

]]>
http://knowledge.achieveee.com/knowledge_base/responsive-modal-lightbox-with-css-js-no-plugins/feed/ 0
Render Image File in HTML http://knowledge.achieveee.com/knowledge_base/render-image-file-in-html/ http://knowledge.achieveee.com/knowledge_base/render-image-file-in-html/#respond Fri, 06 May 2016 11:15:30 +0000 http://achieveee.com/knowledgebase/?post_type=knowledge_base&p=2425 jQuery
$("form").on("change", "input[type='file']", function() {
    if ($(this).val()) {
        read_image(this);
    }
});

// render image files
function read_image(input) {
    if (input.files && input.files[0]) {
        var reader = new FileReader();

        reader.onload = function (e) {
            $(input).parent().find('img').attr('src', e.target.result);
        }

        reader.readAsDataURL(input.files[0]);
    }
}

 

]]>
http://knowledge.achieveee.com/knowledge_base/render-image-file-in-html/feed/ 0
Back to Top Responsive HTML button http://knowledge.achieveee.com/knowledge_base/back-to-top-responsive-html-button/ http://knowledge.achieveee.com/knowledge_base/back-to-top-responsive-html-button/#respond Fri, 06 May 2016 11:02:31 +0000 http://achieveee.com/knowledgebase/?post_type=knowledge_base&p=2419 A Powerful yet Light & Simple Back to Top Responsive HTML button with controls

HTML

<body>
    <a href="#" class="back-to-top">
        <i class="fa fa-chevron-up"></i>
    </a>
</body>

jQuery

$( document ).ready(function() {
    // back to top
    var amountScrolled = 300;

    $(window).scroll(function() {
        if ($(window).scrollTop() > amountScrolled) {
            $('a.back-to-top').fadeIn('slow');
        }
        else {
            $('a.back-to-top').fadeOut('slow');
        }
    });

    $('a.back-to-top').click(function() {
        $('body, html').animate({
            scrollTop: 0
        }, 400);
        return false;
    });
});

CSS

a.back-to-top {
    display: none;
    text-align: center;
    line-height: 50px;
    width: 50px;
    height: 50px;
    position: fixed;
    z-index: 999;
    right: 20px;
    bottom: 20px;
    background-color: #1ab394;
    color: #fff;
    border-radius: 3px;
}
a.back-to-top:hover {
    color: #fff;
}

 

]]>
http://knowledge.achieveee.com/knowledge_base/back-to-top-responsive-html-button/feed/ 0