I have a html form which is for the printing purpose. The html form have two different style sheet for the web view and print view. I want to add two different JavaScript functions (those function has using to handle the dynamic height for the row in the form but not working in the print view).
How I can add a JS function only for the print view?.
I am using the following code for the print view. But its not working .
@Printing = print : () -> if /TappyNativeApp/.exec(navigator.userAgent) document.location = "toppy:printView:" else if window.print alert("hi") heightvalue = $(".show_seller_box").outerHeight(); $(".buyer_box").outerHeight(heightvalue); window.print() jQuery ($) -> $('.print_btn').click( (event) -> Printing.print() )'