Blame view

js/crep.js 459 Bytes
8485d451   Geoffrey PREUD'HOMME   New dynamic JS nav
1
2
3
4
5
6
7
8
9
10
  function loadDoc(ev) {
      var location = ev.currentTarget.href
      if (location.indexOf(window.location.host) >= 0) {
          $.get(location + '?c', function (data) {
              mainContainer = $("#mainContainer")
              mainContainer.html(data)
              dynamiseLinks(mainContainer)
          })
          return false
      }
7ab7e900   Jean Wasilewski   file function added
11
12
  }
  
8485d451   Geoffrey PREUD'HOMME   New dynamic JS nav
13
14
15
16
17
18
19
  function dynamiseLinks(el) {
      $("a", el).click(loadDoc)
  }
  
  $(document).ready(function () {
      dynamiseLinks(document)
  })