I need to integrate on my site the fullcalendar linked to google calendar.
I can show the full calendar on my site with the default events (all day event, etc)
I use the guide http://fullcalendar.io/docs/
The problem is when I try to integrate it with google calendar. I get the browser key and the ID calendar but it still showing the default events...
My code on the head is:
<link rel='stylesheet' href='fullcalendar/fullcalendar.css' />
<script src='lib/jquery.min.js'></script>
<script src='lib/moment.min.js'></script>
<script src='fullcalendar/fullcalendar.js'></script>
<script type='text/javascript' src='fullcalendar/gcal.js'></script>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
googleCalendarApiKey: 'MY_BROWSER_KEY',
events: {
googleCalendarId: 'MY_CALENDAR_ID'
}
})
});
</script>
At the body I have the:
<div id='calendar'></div>
I have follow the guide step by step. But as I said, the fullcalendar stills showing the defaults events and not the google calendar events.
image of my fullcalendar
What I am doing wrong??
Thanks.
I'm stucked with this and I need to solve it.
I have tryed a lot of codes for getting the gcalendar events or integrate fullcalendar with google calendar but does not work.
I only need an example of one of this. Get the gcalendar events or the integration with fullcalendar with the keys.
I don't know what else to do..
Related
I'm stuck with setting up correctly FB pixel code, events like page view and content view work fine, but seems I missing something with tracking button clicks like "AdToCart" or "InitiateCheckout" events. Tried to play with a code, but didn't figure out it.
Here is the original code I tried to implement from Facebook for Add to Cart event.
<script>
<button id="button add-to-cart-button">AddtoCart</button>
<script type="text/javascript">
$('#addToCartButton').click(function() {
fbq('track', 'AddToCart', {currency: "EUR", value: {{ option.price }}});
});
</script>
What am I doing wrong?
First, you cannot have multiple ids to one element. The id is unique, so id="add-to-cart-button"
Second, the id is 'add-to-cart-button', so the jquery selector should match that: #add-to-cart-button not #addToCartButton
I'm using google calendar to display events using fullcalendar, however they all show
like this.
When I click on one of those lines they do redirect to the correct event in google calendar - So the events are recognised. I've used lots of different javascript examples but they all do the same, this is the basic one i've been using:
$(function() {
$('#calendar').fullCalendar({
googleCalendarApiKey: 'myAPI',
events: 'myCalendarID'
});
});
I also copy pasted one of the full calendar demos (and changed my API key) but it still displays the same as the image above.
I am using javascript and I need to display an alert only once when the user click anywhere in the site. But make sure it will not pop up everytime the user click anywhere.
Im not professional but I need this code to embed in my e-commerce site. I have tried a regular onload alert. but it will show once the page is loaded. then i tried this automatic code:
</html>
<head>
<script language="JavaScript">
<!--
document.onclick = myClickHandler;
function myClickHandler() {
alert("All orders require minimum two weeks notice due to the nature of event and wedding products");
}
-->
</script>
</head>
<body>
</html>
and works, but every time I click appear and that is annoying. I need a onclick event, anywhere in the page... to display an alert only once. to advise the user about important info.
Desperatly need some solution. Thanks
$(function () {
$(document).on('click.once', function () {
alert("Alerted once");
$(document).off('click.once');
})
});
This makes use of the .off() and named event feature in jQuery.
.off feature
event namespaces
I need to track a pinterest button in google analytics. The first code works for an html website implimented after the pinterest button code that is wrapped in a pin div. I am trying to apply it to the second code below which is part of an array of social media buttons. I can not get it to work however. Any help would be appreciated.
I am on my phone. Ill post the full code later, just wanted to throw this out there.
<div class="pin">Pin It</div>
<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script>
<script>
$(document).ready(function() {
$('div.pin').click(function() {
_gaq.push(['_trackSocial', 'Pinterest', 'pin', $(location).attr('href')]);
});
});
</script>
'script' => '
<div class="pin">Pin It</div>
<script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"> </script>
<script type="text/javascript">
$(document).ready(function() {
$(\'div.pin\').click(function() {
_gaq.push([\'_trackSocial\', \'Pinterest\', \'pin\', $(location).attr(\'href\')]);
});
});
</script>',
The opening script tag is not closed:
<script type="text/javascript">
$(document).ready(function() {
$(\'div.pin\').click(function() {
_gaq.push([\'_trackSocial\', \'Pinterest\', \'pin\', $(location).attr(\'href\')]);
});
});
</script>',
I wrote a tutorial or at least an explination on how I tracked Pinterest, Google+, Facebook, and Twitter on an old HTML page using Google Analytics, I've used the same basic techniques on my favourite quotation mashup and even on my current employer's latest campaign page.
Basically jQuery is used to add in the event, this isn't a technique, other people thought of it first, but getting all four to work together is more work, plus I did the proper structured metadata etc. etc.
I am trying following code but it doesn't works for me.
//loading linkedin library
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: *******
authorize: true
</script>
//and making api request below
<script>
IN.API.Connections("me")
.result(function(data){
alert(data);
});
</script>
I can't get an alert box, this means IN.API.Connections won't run and I am not getting any error. Please help.
You'll need to define some javascript function in your script to actually do something with the results you get back from the API. The alert box simply displays the data you get back.
The most basic call to fetch connections in JSAPI would look something like this:
IN.API.Connections("me")
.result(doMyThing)
Where "doMyThing" is simply a javascript function that will handle and process the results that get returned.
There's also a document detailing this call on the LinkedIn Developer site: https://developer.linkedin.com/documents/inapiconnections
Try this:
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: *******
authorize: true
scope: r_basicprofile r_network
</script>