sss
Showing
2 changed files
with
54 additions
and
2 deletions
| ... | @@ -234,11 +234,63 @@ $(window).on('load resize scroll', function() { | ... | @@ -234,11 +234,63 @@ $(window).on('load resize scroll', function() { |
| 234 | } | 234 | } |
| 235 | //$('#exampleModal').find('form').append('<input type="hidden" name="planner_id" value="'+$(this).data('id')+'"/>') | 235 | //$('#exampleModal').find('form').append('<input type="hidden" name="planner_id" value="'+$(this).data('id')+'"/>') |
| 236 | $('#exampleModal').modal('show'); | 236 | $('#exampleModal').modal('show'); |
| 237 | window.open('https://yournumbers.ca/wp-content/uploads/2022/03/FP_Financial-Stress-Index_R1b.pdf', "_blank", "resizable=yes, scrollbars=yes, titlebar=yes, width=800, height=900, top=10, left=10"); | 237 | $.ajax({ |
| 238 | url: '/wp-content/uploads/2022/03/FP_Financial-Stress-Index_R1b.pdf', | ||
| 239 | method: 'GET', | ||
| 240 | xhrFields: { | ||
| 241 | responseType: 'blob' | ||
| 242 | }, | ||
| 243 | success: function (data) { | ||
| 244 | var a = document.createElement('a'); | ||
| 245 | var url = window.URL.createObjectURL(data); | ||
| 246 | a.href = url; | ||
| 247 | a.download = 'myfile.pdf'; | ||
| 248 | document.body.append(a); | ||
| 249 | a.click(); | ||
| 250 | a.remove(); | ||
| 251 | window.URL.revokeObjectURL(url); | ||
| 252 | } | ||
| 253 | }); | ||
| 254 | |||
| 255 | |||
| 238 | 256 | ||
| 239 | }); | 257 | }); |
| 240 | 258 | ||
| 241 | 259 | ||
| 260 | |||
| 261 | |||
| 262 | |||
| 263 | |||
| 264 | |||
| 265 | |||
| 266 | // function SaveToDisk(fileURL, fileName) { | ||
| 267 | // // for non-IE | ||
| 268 | // if (!window.ActiveXObject) { | ||
| 269 | // var save = document.createElement('a'); | ||
| 270 | // save.href = fileURL; | ||
| 271 | // save.target = '_blank'; | ||
| 272 | // save.download = fileName || 'unknown'; | ||
| 273 | |||
| 274 | // var evt = new MouseEvent('click', { | ||
| 275 | // 'view': window, | ||
| 276 | // 'bubbles': true, | ||
| 277 | // 'cancelable': false | ||
| 278 | // }); | ||
| 279 | // save.dispatchEvent(evt); | ||
| 280 | |||
| 281 | // (window.URL || window.webkitURL).revokeObjectURL(save.href); | ||
| 282 | // } | ||
| 283 | |||
| 284 | // // for IE < 11 | ||
| 285 | // else if ( !! window.ActiveXObject && document.execCommand) { | ||
| 286 | // var _window = window.open(fileURL, '_blank'); | ||
| 287 | // _window.document.close(); | ||
| 288 | // _window.document.execCommand('SaveAs', true, fileName || fileURL) | ||
| 289 | // _window.close(); | ||
| 290 | // } | ||
| 291 | // } | ||
| 292 | |||
| 293 | |||
| 242 | $(document).on("click",".start_a_contact",function() { | 294 | $(document).on("click",".start_a_contact",function() { |
| 243 | 295 | ||
| 244 | if ($(window).width() < 600) { | 296 | if ($(window).width() < 600) { | ... | ... |
| ... | @@ -5,7 +5,7 @@ | ... | @@ -5,7 +5,7 @@ |
| 5 | Author: the Understrap Contributors | 5 | Author: the Understrap Contributors |
| 6 | Author URI: https://github.com/understrap/understrap-child/graphs/contributors | 6 | Author URI: https://github.com/understrap/understrap-child/graphs/contributors |
| 7 | Template: understrap | 7 | Template: understrap |
| 8 | Version: 1.1.30383 | 8 | Version: 1.1.30384 |
| 9 | License: GNU General Public License v2 or later | 9 | License: GNU General Public License v2 or later |
| 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html | 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 11 | Text Domain: understrap-child | 11 | Text Domain: understrap-child | ... | ... |
-
Please register or sign in to post a comment