You started your blog because you want people to read it. You want your blog to connect with people. You want your content to reach a wide audience. You want to build a base of fans that gobble up your every word. And yes, at some point, you also want to make money from your blog. Because let’s face it … as much as you love to write, you didn’t start your blog as a journaling project. (If you did, this article isn’t for you.) But here’s the thing … if you want your writing to connect with people, you need to connect with them first. And the best way to connect with anyone is to talk to them — as in, one-on-one. That’s why every blogger should offer coaching. Yes, even you. Even if you don’t think you can. “But… My Niche Really Isn’t Coaching-Compatible…”You sure about that? Okay, I won’t lie — some niches do lend themselves to coaching more than others. Everyone’s heard of business coaches, dating coaches, and fitness coaches. And if you blog on those topics, coaching people will feel like a natural step. On the other hand, nobody’s ever heard of a web design coach, an anxiety coach, or a travel coach. Those niches aren’t quite as compatible with coaching as the previous ones. But that doesn’t mean you can’t offer a coaching-like service. You don’t have to label it “coaching” if it doesn’t feel natural, but you can offer something that gets you one-on-one time with your audience. For example:
So let’s be clear: You don’t have to be a coach in the traditional sense of the word. The important thing is that you get to talk to (and help!) your audience in a one-on-one setting. “But… But… I’m Not Ready to Be a Coach!”Let’s be real. Your first coaching sessions will always feel scary, and you’re not going to feel ready the first few times you do it. But you shouldn’t wait to start coaching until you feel ready, because you won’t feel ready until you start coaching. Jeff Goins started coaching early in his blogging career, and even he admits he was mostly winging it at first:
Early on in my blogging career, people started asking me to coach them. I had no idea what this meant or how to do this. So, of course, I said yes. I began meeting with people in person and on the phone and seeing how I could help them. When we met, I realized what Derek Sivers says — ”what’s obvious to you is amazing to others” — is true.
Yes, you read that right. One of the world’s most popular writing coaches had little clue what he was doing when he started coaching. He was just confident he could help people get results, so he said yes. And that’s the point: Coaching clients don’t expect you to be perfect. They just want you to help them get results. If you have enough knowledge to run a blog on a certain topic, you have enough knowledge to get people results on that same topic. Right? Right. (Otherwise, I doubt you’d have started your blog in the first place.) If you’re uncomfortable charging people at first, that’s totally understandable. (And even honorable that you don’t want to take money without first proving your value.) To get past this, go ahead and offer your first 5–10 coaching calls for free. You’ll not only gain experience running a coaching call, you’ll also gain the confidence to charge people for a session when the time comes. 3 Critical Reasons You Should Offer Coaching to Your AudienceAre you feeling convinced that you can offer coaching on your blog? Good, then we can talk about why you should. The truth is, coaching can be a godsend for your blogging business. I’ve been blogging for almost four years now, and it’s only been in the last year or so that I got the readership, engagement, and profitability I’ve wanted all along. I don’t think it’s a coincidence that I also started coaching about a year and a half ago. Here are three ways coaching will benefit you as a blogger: #1. You Gain New Insights and Create More Engaging ContentOne of the coolest things about coaching is that clients will tell you their own specific struggles without you having to guess. I know that sounds uber-simplistic, but how many hours do you spend scouring the web for information on your audience instead of just asking them directly? Coaching clients are incredibly forthcoming with what they need your help with, which means you’ll gather a ton of valuable insights for your content strategy. Take Jacob McMillen, who noticed some tangible data differences after running his first coaching/mentorship program. He’d reached the six-figure mark as a writer, and wanted to know how he could help other people do the same.
I decided to mentor 10 writers for 3 months and see what would happen. I priced it at $200 per month to make it accessible and all 10 spots were filled within a few days. My hope was that, even if I wasn’t successful, I would get a more intimate understanding of what was really holding people back.
From mentoring only ten people, he already got a wealth of information and results. It was a lot of work, but worth it in the long run. After the group mentoring experiment, he realigned his content marketing based on the information he collected, and saw the following results:
After his coaching experiment, the insights he gathered helped him develop more compelling content for his particular audience, and as you can see, his engagement shot way up. #2. You Can Start Earning Cash Right AwayOne of the best parts of coaching is that you can make money right away. As we saw above, Jacob mentored ten students at $200 a pop, which means he brought in $2,000 he wouldn’t have otherwise. In my own business, I let people book one-off sessions ranging in price from $125 to $200, and sometimes I even book month-long programs for corporate teams for thousands of dollars. It’s relatively quick and easy money, and you don’t even have to spend time creating a product. Coaching is something you can start to offer as soon as you get readers. (Or even sooner, if you explore other ways to score your first coaching clients.) Even if you don’t start out charging $100+ per session, and even if you’re only getting the occasional client at first, it’s still cash in your bank. Yes, even if you only book one session per week and only charge $30 to $50 for it, that’s still money coming in. (And it means you’re officially “in business” as a professional blogger.) #3. You Can Validate and Refine Your Product IdeasAs Pat Flynn put it: “If you truly want to know whether or not a product will sell or not, you’ve got to get people to pull out their wallets and actually pay you for it.” He’s right. You’ll never know if you’ve got something worth paying for until someone pays for it. One of the most popular ways to make money as a blogger is through product development — but with the amount of time that takes, it can be a risky venture if you don’t validate your product idea beforehand. And you can validate your product idea by selling coaching sessions aimed at helping people reach the same goal. You’ll already know people are willing to pay for it, so you’ll reduce most of the risk up front. Not only that, but the insights you get from coaching will help you refine your product and maximize its effectiveness. James Johnson based his entire first course on the results he got from coaching:
I was looking to find my first product to run through Freelance Writers School. I needed to find out what people needed, and what I could deliver to them in a small space of time.
So I asked around some freelance friends on Facebook, explained to them what I was doing, and offered to coach them for free on some of the problems they were having in their business. James got one friend on board and asked him what his problems were. James then offered his solutions, and when they worked, he’d add them to his course as modules. When they didn’t work, he’d cut them and try something new. When James was done, he’d helped his friend grow his freelancing business, and he’d assembled 90% of a course. He then continued to test his solutions on paid coaching clients, noting where they hit roadblocks or had further questions. This helped him refine his course further, making it even more helpful and easier to navigate. Start Coaching Right Now and Reap the Many BenefitsYour first coaching offer doesn’t have to be perfect, especially if you’re at the first stages of using it as a method of market research and a simple stream of revenue. You’ll refine your offer(s) over time, and only experience with coaching can teach you how to become a better coach for your audience. You’ll learn so much about your audience, build a better blog, earn some money, and gather the information you need to make your blog more profitable in the long term. (Plus, you’ll be helping people with your knowledge, which is rewarding in and of itself.) It’s a win-win-win situation, and the world is waiting for your expertise. So give it to them.
About the Author: Chelsea Baldwin is the founder of Copy Power, where she teaches copywriting and helps entrepreneurs make the kind of bang-bang impression that gets remembered. (Even days after people leave your site.) Use her free 3-part email course to learn how to write astonishingly memorable copy for yourself, even if you’re not a writer.
from https://smartblogger.com/why-offer-coaching/
0 Comments
Are you looking for a way to start making money from your blog? Having you considered providing a specific service? Prerna Malik share how she built her service-based business using her blog. Listen to This EpisodeWho is Prerna Malik?Prerna Malik is a conversion copywriter and founder of Content Bistro. She crafts profit-boosting sales and email copy for high-impact launches. As a result, she has worked with industry leaders. People like Amy Porterfield, Bushra Azhar, Carrie Wilkerson, Katrina Springer, April Perry Wilson and many others. Prerna's BackstoryWhen Prerna had her daughter, she decided to leave her corporate job to be able to stay at home. Nine months in, she needed a creative outlet and started a blog called “The Mom Writes” as an online journal. She wrote about topics related to parenting and green living. After hearing about Twitter from her audience, she decided to start using it. It was a great way to connect with her audience, and it was working. After writing on her blog for a while, she started getting noticed. Companies started approaching her to write for them and manage their social media. In January 2010, her husband got very ill. Later that year, it got so bad that he had to quit. They were both at home and their medical bills were piling up. Not to mention having a young daughter at home. It was a trying year. But it was also the year that they decided that they HAD TO make the business work for them. How to Build a Service-based BusinessWhen she first started their business, her budget was minimal. She estimates that she spent about $100 that year – the price of hosting. How did she do it? Here are some of her tips… Cold-emailing potential clientsPrerna searched on Google and in business directories to find potential clients. She also used Similar Web to find sites that were like the sites she found. Her goal was to find as many sites in the parenting and green living space as possible. But she wanted to make sure her cold emails were effective. She recommends the following tips for crafting good emails:
Price yourself wellPrerna says that it's important to price yourself according to the value you provide. She always priced herself based on her experience and expertise. In the beginning, that was on the lower end. Over time, and based on research, she started increasing her price. Follow-upIf you don't hear from your contact in 3-5 business days, follow up with another polite email. Some of the questions Prerna would include in those follow-up emails were: Do you have a question? Can we help you? Would you like to hop on a call? If you still haven't heard from them in a week, follow up again. A great question as this point is – “Have you had a chance to go over the email? Finding ClientsBy going through this process often in the beginning, it got easier. Not only that, she found that she would have to do this less over time. Because she provided a great service, she started getting more referral. Now, most of her clients come via referral and her blog. Systems and ProcessesOver the years, Prerna has managed to 10x her business. Part of the reason for this is the systems and processes she uses in her business. Here are some of the things she suggests:
She also has a detailed process for onboarding her clients. Here's how it works in her business
In SummaryPrerna was able to build a successful serviced-based business around her blog. Her skill was writing. Yours may be something else. Her skill has value, but so does yours. My hope is that you're inspired by her story. And if you've been thinking about using your skills to provide a service to your audience, take action. She shared how she was able to do it. Now you go, do, and then come back to share! InfographicThe post 321 How to Build a Service-based Business Around Your Blog – Prerna Malik appeared first on Become A Blogger by Leslie Samuel. from https://www.becomeablogger.com/25863/build-a-service-based-business-around-blog/ You want your website’s visitors to have the best experience possible, right? Well, then you better not keep them waiting. Slow-loading pages are one of the biggest frustrations people experience online. In fact, having slow page loads can affect everything from how many people view your site and where you rank in Google to how likely people are to buy from you. In other words, having a fast website is crazy-important. But what can you do? You’re not a developer, so you don’t have the first clue how to speed up your site. That’s where WP Super Cache comes in. It’s a free plugin that can slash your page load times in half without the need for any special knowledge. Here’s how it works… How WP Super Cache Makes Your Website FasterBefore I explain how WP Super Cache works, you need to understand how WordPress serves your content to your visitors. This will get a bit technical, but don’t worry, I’ll try to keep this as painless and human-friendly as possible. I know most of you aren’t developers. (And neither am I!) Here’s what goes on under the hood of your site: Whenever you get a visitor, WordPress builds the page through a number of processes which involve:
Normally, WordPress executes these processes dynamically. That means WordPress has to execute all separate processes to load your website’s content for each individual visit. Now computers are fast these days, but this still takes time. And your visitors can’t see your website until these processes are complete, which means they have to wait to start using your site (a.k.a. slow page load times ). That’s exactly the problem WP Super Cache fixes. WP Super Cache Turns Dynamic into Static to Speed Up Your SiteUsing something called page caching, WP Super Cache stores a static HTML copy of your content for visitors to browse. Basically, it stores a copy of the end result of the dynamic process outlined above. That way, your web server no longer needs to execute the PHP or query your database for each individual visitor. Instead, it serves up the already-finished product. And because your server has to do significantly less work, it loads the finished page much faster. Here, I’ll prove it… Putting WP Super Cache to the Test with Real DataFor this tutorial, I’ll set up a test site and upload a full landing page so it seems “real.” Then I’ll use Pingdom’s Speed Test tool to show how quickly my site loads before WP Super Cache is installed, and how quickly it loads after various steps in the configuration process. (I recommend you do the same when you install the plugin.) That way, you’ll see exactly how much of an effect WP Super Cache has. Ready? Here’s the page load time before installing WP Super Cache: 2.02 seconds isn’t horrible, but we can do a lot better! Let’s install WP Super Cache and see how fast we can get. Step #1: Install the WP Super Cache PluginWP Super Cache is listed in the official WordPress.org plugin directory, which means that you can install it straight from your WordPress dashboard. To do that, go to Plugins → Add New. Then search for “WP Super Cache” and click the Install Now button: After a few seconds, the Install Now button should change to read Activate. Click that Activate button to make WP Super Cache active: Now the plugin is active on your site. But it’s still not working quite just yet. Here’s what to do next… Step #2: Turn On Basic Caching for an Instant 50% Reduction in Page Load TimesOne of the beautiful things about WP Super Cache is how easy it is to start using the plugin. All you need to do is click a button. Yes, really. You can configure some of the advanced settings to optimize your load times further (which we’ll cover in a minute), but clicking that one button gives you the biggest speed boost. Here’s what you do: Go to Settings → WP Super Cache in your WordPress dashboard. Then select the radio box for Caching On and click Update Status: And just like that, you’ve activated basic page caching on your site. By itself, that should lead to a major speed improvement. How major? Let’s find out! Here’s my page load time after clicking the button: Now, my test site loads in just 883 milliseconds. (Remember, it was 2.02 seconds before.) Let me press a few buttons on my calculator, and… Yup, I cut more than half off my page load time with less than five minutes of work. Amazing, right? But we’re not stopping there. Because WP Super Cache includes some advanced settings that can:
So let’s soldier on and configure some of these settings. Step #3: Configure Advanced Settings for an Even Bigger Speed BoostTo get started, head to the Advanced tab in the WP Super Cache Settings area: To configure most of the advanced settings, you pretty much just need to check a box. Below, I’ll explain each box that I recommend you check, starting in the Miscellaneous section. 1.) Exclude Admin Accounts and Other Users from CachingThis way, WordPress will still dynamically generate pages for people who are logged in. One issue that arises from caching is that it takes around 30 minutes for changes you make to your site to go live. That means you’d have to wait 30 minutes before you can see the result of your changes. Obviously, this would be a pain. That’s why you should check the box for Don’t cache pages for known users and keep that from happening: This way, WordPress will keep generating pages dynamically for logged-in users (i.e., you, the administrator). You’ll always get the latest dynamically-generated version of your site, while anonymous users get the performance-optimized static version. 2.) Enable GZIP Compression for Another Small Speed BoostNext, you should check the box to Compress pages so they’re served more quickly to visitors. Here’s what that does: WP Super Cache will shrink (compress) the size of the static file that it generates without affecting the file’s functionality. Because the file size is smaller, your page will load a little bit faster: How much quicker? After enabling this setting, my page load time shrunk a little more, down to 837 milliseconds: It’s definitely not as big a reduction as before. But when it comes to page load times, every bit counts!
Note: While I’ve never experienced any issues, this setting can cause problems with some hosts. For that reason, you should double-check your site’s functionality after enabling this setting.
If you encounter any issues, you can just uncheck the box. While you’re missing out on a small speed boost, the difference is relatively negligible. 3.) Enable Browser Caching to Eliminate Redundant DownloadsSo far, you’ve enabled WP Super Cache for page caching, but you should enable the plugin for browser caching as well. This can boost load times even further for recurring visitors. Here’s how it works: Browsers temporarily store files on each visitor’s computer. By enabling browser caching, you tell your visitor’s browser not to reload parts of your page that haven’t changed from their last visit. Instead, their browser will load the file from their computer, which is much faster than downloading it from your host server. To enable this setting, check the box for 304 Not Modified browser caching: Unfortunately, because Pingdom doesn’t store files the same way regular people’s computers do, I can’t show you how much this boosts performance. 4.) Exclude Pages from Caching (If They Experience Issues)Caching is unlikely to cause issues with 99% of your site. But it can happen, especially on any pages where you ask visitors to enter information in a form. For example, I’ve personally had an issue where the contact form on my portfolio site wasn’t working due to my caching plugin. Yikes! This can directly lead to lost business, which is why you should test important pages on your site as an anonymous user after installation. (Remember, you just enabled the setting to exclude your WordPress account from seeing cached pages.) How? Depending on your browser, open up a new window in Incognito mode (Shift + Ctrl + N in Chrome or Opera) or Private Browsing mode (Shift + Ctrl + P in Firefox or Internet Explorer) and test the page that way: If you notice anything funky, you can manually exclude that page from being cached to avoid any issues. Just scroll down the Advanced Settings page until you reach Accepted Filenames & Rejected URIs. In the section that starts with “Add here strings (not a filename)”, enter the URL slug for the page that’s having issues. In the example above, you can see that I’ve manually excluded my Contact Me page. Not sure where to find the URL slug? Just go to the page with issues and copy the part that comes after the slash: 5.) Consider Using a CDN to Speed Things Up Even MoreYou might not know this, but physical distance still has an effect on how quickly a website loads. (Curse you, laws of physics!) So the farther away your visitor is from your host server, the slower your site will load — unless you use a CDN (a.k.a. Content Delivery Network). When you use a CDN, you distribute copies of your site’s static files (like your images) to different servers around the world. That way, your visitors can download these files from a location that’s close to them, instead of downloading them from your host server. And WP Super Cache offers an option to install a CDN on the CDN tab: But here’s the thing… I recommend not using WP Super Cache for this, and using Cloudflare instead. Cloudflare is a CDN that:
But you can’t use WP Super Cache to install Cloudflare. You install it by changing your nameservers. (Here’s a tutorial to get you started.) So how much does a CDN like Cloudflare speed up your site, anyway? Once again, let’s see the data: You can see that my site now loads in 824 milliseconds, which is another small improvement from the previous speed of 837 milliseconds. Now, that may not seem like much, but remember that the CDN’s purpose is to make your website fast for people around the globe. So even though you only see a small speed improvement here, the improvement will likely be far greater for people visiting from Europe, Asia, or Australia. How to Manually Clear Your Cache (And Why This Is Important)Almost finished! There’s just one more thing I want to cover. As I talked about earlier, caching can delay changes made to your site. But sometimes you’ll make a change to your site that you want to go live right away for all users. You do this by manually clearing your cache. This forces WP Super Cache to generate a new cache that incorporates your most recent changes. Here’s how to do it: Go to Settings → WP Super Cache. Then click on the Contents tab and choose Delete Cache. And that’s all there is to it! Delight Your Readers with a Quick-Loading WebsiteGoing forward, you’ll never need to worry whether your visitors are yelling at their computer screens, waiting for your website to load. Now you have the knowledge you need to ensure your website loads as quickly as it can, for everyone. All that’s left to do is to put your knowledge into action. Install the WP Super Cache plugin, click that button, and configure the advanced settings. You’ll have a faster-loading website before you can finish a cup of coffee.
About the author: Colin Newcomer is a freelance writer for hire with a background in SEO and affiliate marketing. He helps clients grow their web visibility by writing primarily about digital marketing and WordPress. In his spare time, he travels and curates graphic t-shirts.
from https://smartblogger.com/wp-super-cache/ Is Spending Time on Social Media Bad for Us? Facebook seems to be making changes, but are they in our best interest? In this episode, I share the brutal reality – Facebook doesn’t care about you. Listen to This EpisodeHard Questions about Social Media UseOn December 15th, 2017, Facebook posted an article on their Newsroom blog. The title of the article was “Hard Questions: Is Spending Time on Social Media Bad for Us?” In the article, they claimed to be focusing on this difficult question. They share a whole bunch of research and drew some interesting conclusions. The Bad:If you use social media passively (lurking), this could negatively impact your well-being. The “Good”:If you use social media to actively interact with people you care about, this could have a positive impact on your well-being. The Solution:Facebook needs to focus on getting you to use the platform in a way where you actively engage with people you care about. This makes perfect sense. EXCEPT for the fact that they pick and choose the data that coincidentally aligns with their business interests. In this podcast episode, I walk through the article sharing why I think it’s flawed and challenge you to take control of how you use social platforms. Also, in terms of business, If any of their business objectives move out of alignment with YOUR business objectives – YOU LOSE (if you focus on their platforms). Here’s what I recommend for building YOUR business: Create GREAT contentThis is how you build a brand/business people care about. Grow YOUR community by SERVING your audienceIt’s all about service. If you put a priority on SERVING your audience, they will grow to know, like and trust you. Show up CONSISTENTLYThe more you show up, the more opportunities will come your way. You don’t need Facebook to make that happen. Drive people back to YOUR platformThis is the only platform you own and control. If you’re building a business, build one where you get to determine the direction of your business. Get them on YOUR email listI’ve said it over and over – your email list is one of your most valuable assets. GROW that email list. Make your audience the starIt’s all about them, and not about you. Make that clear and they will care about you. Resources Mentioned
InfographicThe post Facebook Doesn’t Care about You so Get over It appeared first on Become A Blogger by Leslie Samuel. from https://www.becomeablogger.com/25850/facebook-doesnt-care/ The post Digital Marketing Agency in Toronto appeared first on Kanwar Manoria Digital. from Kanwar Manoria Digital http://kanwarmanoria.digital/digital-marketing/agency-toronto/ from https://kanwarmanoria.tumblr.com/post/169968893647 The post Toronto SEO appeared first on Kanwar Manoria Digital. from Kanwar Manoria Digital http://kanwarmanoria.digital/toronto/seo/ from https://kanwarmanoria.tumblr.com/post/169954010557
//
window.cfields = {"1":"budget","2":"keyword","3":"website_url"};
window._show_thank_you = function(id, message, trackcmp_url) {
var form = document.getElementById('_form_' + id + '_'), thank_you = form.querySelector('._form-thank-you');
form.querySelector('._form-content').style.display = 'none';
thank_you.innerHTML = message;
thank_you.style.display = 'block';
if (typeof(trackcmp_url) != 'undefined' && trackcmp_url) {
// Site tracking URL to use after inline form submission.
_load_script(trackcmp_url);
}
if (typeof window._form_callback !== 'undefined') window._form_callback(id);
};
window._show_error = function(id, message, html) {
var form = document.getElementById('_form_' + id + '_'), err = document.createElement('div'), button = form.querySelector('button'), old_error = form.querySelector('._form_error');
if (old_error) old_error.parentNode.removeChild(old_error);
err.innerHTML = message;
err.className = '_error-inner _form_error _no_arrow';
var wrapper = document.createElement('div');
wrapper.className = '_form-inner';
wrapper.appendChild(err);
button.parentNode.insertBefore(wrapper, button);
document.querySelector('[id^="_form"][id$="_submit"]').disabled = false;
if (html) {
var div = document.createElement('div');
div.className = '_error-html';
div.innerHTML = html;
err.appendChild(div);
}
};
window._load_script = function(url, callback) {
var head = document.querySelector('head'), script = document.createElement('script'), r = false;
script.type = 'text/javascript';
script.charset = 'utf-8';
script.src = url;
if (callback) {
script.onload = script.onreadystatechange = function() {
if (!r && (!this.readyState || this.readyState == 'complete')) {
r = true;
callback();
}
};
}
head.appendChild(script);
};
(function() {
if (window.location.search.search("excludeform") !== -1) return false;
var getCookie = function(name) {
var match = document.cookie.match(new RegExp('(^|; )' + name + '=([^;]+)'));
return match ? match[2] : null;
}
var setCookie = function(name, value) {
var now = new Date();
var time = now.getTime();
var expireTime = time + 1000 * 60 * 60 * 24 * 365;
now.setTime(expireTime);
document.cookie = name + '=' + value + '; expires=' + now + ';path=/';
}
var addEvent = function(element, event, func) {
if (element.addEventListener) {
element.addEventListener(event, func);
} else {
var oldFunc = element['on' + event];
element['on' + event] = function() {
oldFunc.apply(this, arguments);
func.apply(this, arguments);
};
}
}
var _removed = false;
var form_to_submit = document.getElementById('_form_1_');
var allInputs = form_to_submit.querySelectorAll('input, select, textarea'), tooltips = [], submitted = false;
var getUrlParam = function(name) {
var regexStr = '[\?&]' + name + '=([^&#]*)';
var results = new RegExp(regexStr, 'i').exec(window.location.href);
return results != undefined ? decodeURIComponent(results[1]) : false;
};
for (var i = 0; i < allInputs.length; i++) {
var regexStr = "field\\[(\\d+)\\]";
var results = new RegExp(regexStr).exec(allInputs[i].name);
if (results != undefined) {
allInputs[i].dataset.name = window.cfields[results[1]];
} else {
allInputs[i].dataset.name = allInputs[i].name;
}
var fieldVal = getUrlParam(allInputs[i].dataset.name);
if (fieldVal) {
if (allInputs[i].type == "radio" || allInputs[i].type == "checkbox") {
if (allInputs[i].value == fieldVal) {
allInputs[i].checked = true;
}
} else {
allInputs[i].value = fieldVal;
}
}
}
var remove_tooltips = function() {
for (var i = 0; i < tooltips.length; i++) {
tooltips[i].tip.parentNode.removeChild(tooltips[i].tip);
}
tooltips = [];
};
var remove_tooltip = function(elem) {
for (var i = 0; i < tooltips.length; i++) {
if (tooltips[i].elem === elem) {
tooltips[i].tip.parentNode.removeChild(tooltips[i].tip);
tooltips.splice(i, 1);
return;
}
}
};
var create_tooltip = function(elem, text) {
var tooltip = document.createElement('div'), arrow = document.createElement('div'), inner = document.createElement('div'), new_tooltip = {};
if (elem.type != 'radio' && elem.type != 'checkbox') {
tooltip.className = '_error';
arrow.className = '_error-arrow';
inner.className = '_error-inner';
inner.innerHTML = text;
tooltip.appendChild(arrow);
tooltip.appendChild(inner);
elem.parentNode.appendChild(tooltip);
} else {
tooltip.className = '_error-inner _no_arrow';
tooltip.innerHTML = text;
elem.parentNode.insertBefore(tooltip, elem);
new_tooltip.no_arrow = true;
}
new_tooltip.tip = tooltip;
new_tooltip.elem = elem;
tooltips.push(new_tooltip);
return new_tooltip;
};
var resize_tooltip = function(tooltip) {
var rect = tooltip.elem.getBoundingClientRect();
var doc = document.documentElement, scrollPosition = rect.top - ((window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0));
if (scrollPosition < 40) {
tooltip.tip.className = tooltip.tip.className.replace(/ ?(_above|_below) ?/g, '') + ' _below';
} else {
tooltip.tip.className = tooltip.tip.className.replace(/ ?(_above|_below) ?/g, '') + ' _above';
}
};
var resize_tooltips = function() {
if (_removed) return;
for (var i = 0; i < tooltips.length; i++) {
if (!tooltips[i].no_arrow) resize_tooltip(tooltips[i]);
}
};
var validate_field = function(elem, remove) {
var tooltip = null, value = elem.value, no_error = true;
remove ? remove_tooltip(elem) : false;
if (elem.type != 'checkbox') elem.className = elem.className.replace(/ ?_has_error ?/g, '');
if (elem.getAttribute('required') !== null) {
if (elem.type == 'radio' || (elem.type == 'checkbox' && /any/.test(elem.className))) {
var elems = form_to_submit.elements[elem.name];
if (!(elems instanceof NodeList || elems instanceof HTMLCollection) || elems.length <= 1) {
no_error = elem.checked;
}
else {
no_error = false;
for (var i = 0; i < elems.length; i++) {
if (elems[i].checked) no_error = true;
}
}
if (!no_error) {
tooltip = create_tooltip(elem, "Please select an option.");
}
} else if (elem.type =='checkbox') {
var elems = form_to_submit.elements[elem.name], found = false, err = [];
no_error = true;
for (var i = 0; i < elems.length; i++) {
if (elems[i].getAttribute('required') === null) continue;
if (!found && elems[i] !== elem) return true;
found = true;
elems[i].className = elems[i].className.replace(/ ?_has_error ?/g, '');
if (!elems[i].checked) {
no_error = false;
elems[i].className = elems[i].className + ' _has_error';
err.push("Checking %s is required".replace("%s", elems[i].value));
}
}
if (!no_error) {
tooltip = create_tooltip(elem, err.join('<br/>'));
}
} else if (elem.tagName == 'SELECT') {
var selected = true;
if (elem.multiple) {
selected = false;
for (var i = 0; i < elem.options.length; i++) {
if (elem.options[i].selected) {
selected = true;
break;
}
}
} else {
for (var i = 0; i < elem.options.length; i++) {
if (elem.options[i].selected && !elem.options[i].value) {
selected = false;
}
}
}
if (!selected) {
elem.className = elem.className + ' _has_error';
no_error = false;
tooltip = create_tooltip(elem, "Please select an option.");
}
} else if (value === undefined || value === null || value === '') {
elem.className = elem.className + ' _has_error';
no_error = false;
tooltip = create_tooltip(elem, "This field is required.");
}
}
if (no_error && elem.name == 'email') {
if (!value.match(/^[\+_a-z0-9-'&=]+(\.[\+_a-z0-9-']+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,})$/i)) {
elem.className = elem.className + ' _has_error';
no_error = false;
tooltip = create_tooltip(elem, "Enter a valid email address.");
}
}
if (no_error && /date_field/.test(elem.className)) {
if (!value.match(/^\d\d\d\d-\d\d-\d\d$/)) {
elem.className = elem.className + ' _has_error';
no_error = false;
tooltip = create_tooltip(elem, "Enter a valid date.");
}
}
tooltip ? resize_tooltip(tooltip) : false;
return no_error;
};
var needs_validate = function(el) {
return el.name == 'email' || el.getAttribute('required') !== null;
};
var validate_form = function(e) {
var err = form_to_submit.querySelector('._form_error'), no_error = true;
if (!submitted) {
submitted = true;
for (var i = 0, len = allInputs.length; i < len; i++) {
var input = allInputs[i];
if (needs_validate(input)) {
if (input.type == 'text') {
addEvent(input, 'blur', function() {
this.value = this.value.trim();
validate_field(this, true);
});
addEvent(input, 'input', function() {
validate_field(this, true);
});
} else if (input.type == 'radio' || input.type == 'checkbox') {
(function(el) {
var radios = form_to_submit.elements[el.name];
for (var i = 0; i < radios.length; i++) {
addEvent(radios[i], 'click', function() {
validate_field(el, true);
});
}
})(input);
} else if (input.tagName == 'SELECT') {
addEvent(input, 'change', function() {
validate_field(this, true);
});
}
}
}
}
remove_tooltips();
for (var i = 0, len = allInputs.length; i < len; i++) {
var elem = allInputs[i];
if (needs_validate(elem)) {
if (elem.tagName.toLowerCase() !== "select") {
elem.value = elem.value.trim();
}
validate_field(elem) ? true : no_error = false;
}
}
if (!no_error && e) {
e.preventDefault();
}
resize_tooltips();
return no_error;
};
addEvent(window, 'resize', resize_tooltips);
addEvent(window, 'scroll', resize_tooltips);
window._old_serialize = null;
if (typeof serialize !== 'undefined') window._old_serialize = window.serialize;
_load_script("//d3rxaij56vjege.cloudfront.net/form-serialize/0.3/serialize.min.js", function() {
window._form_serialize = window.serialize;
if (window._old_serialize) window.serialize = window._old_serialize;
});
var form_submit = function(e) {
e.preventDefault();
if (validate_form()) {
// use this trick to get the submit button & disable it using plain javascript
document.querySelector('[id^="_form"][id$="_submit"]').disabled = true;
var serialized = _form_serialize(document.getElementById('_form_1_'));
var err = form_to_submit.querySelector('._form_error');
err ? err.parentNode.removeChild(err) : false;
_load_script('https://kanwarmanoriadigital.activehosted.com/proc.php?' + serialized + '&jsonp=true');
}
return false;
};
addEvent(form_to_submit, 'submit', form_submit);
})();
//
The post Get Started appeared first on Kanwar Manoria Digital. from Kanwar Manoria Digital http://kanwarmanoria.digital/seo/get-started/ from https://kanwarmanoria.tumblr.com/post/169897471717 The post Ottawa SEO appeared first on Kanwar Manoria Digital. from Kanwar Manoria Digital http://kanwarmanoria.digital/ottawa/ottawa-seo/ from https://kanwarmanoria.tumblr.com/post/169885515287 The post SEO Vancouver appeared first on Kanwar Manoria Digital. from Kanwar Manoria Digital http://kanwarmanoria.digital/seo/seo-vancouver/ from https://kanwarmanoria.tumblr.com/post/169885078492 Do you want to make more money with your blog? Of course you do. And in this post, I will give you ten ways to increase your blog revenue. Listen to Episode: The post Ten Ways to Increase Your Blog Revenue appeared first on Become A Blogger by Leslie Samuel. from https://www.becomeablogger.com/25830/ten-ways-increase-blog-revenue/ |
ABOUT MEHello I am Claude 32 years old. I have been doing internet marketing for 7 years and successfully running 3 e-commerce stores. I like to share tips with people aobut online business. Archives
August 2019
Categories |