Skip to content

grantspilsbury/vicinity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Vicinity

Copy the vicinity.js file to your server.

Copy the vicinity.css file to your server.

Copy the jquery.min.js file to your server. Note jquery v 1.11.1 is being used as older Blackberry's will not work on the latest version.

Include the following between the head tags of your html page

  <link rel="stylesheet" type="text/css" href="vicinity.css">
  <script src="./jquery.min.js"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

Add the following between the body tags of your html page.

  <div id="sticky" class="banner-sticky" style="position: fixed;">
  </div>

Add the following JS to the bottom of your html page, just above the closing body tag:

  <script type="text/javascript" src="./vicinity.js"></script>
  
  <script type="text/javascript">

    var pubReference = 34;
    var sessionId = ""; // possibly get from a cookie

    new Vicinity (pubReference, sessionId, function(result) {
    // success function
      $(function() {
        $("#ad").html(result.ad.getBannerHtml());
        displayResults(result);
      })
    }, function(result) {
      // error function
      $(function() {
        console.log('error');
        console.log(result);
        displayResults(result);
      })
    });
  </script>

Make sure to change the pubReference to your specific publisher reference number.

Include a sessionId if your site stores the session ID e.g. in a cookie.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published