Posts

Showing posts with the label Jquery

PDF not open using base64 in chrome

Solved : These options will be help full for resolving the issue. 1- Convert base64 to blob var blob = b64toBlob("JVBERi0xLjcKCjEgMCBvYmogICUgZW50cnkgcG9pbnQKPDwKICAvVHlwZSAvQ2F0YWxvZwog' +   'IC9QYWdlcyAyIDAgUgo+PgplbmRvYmoKCjIgMCBvYmoKPDwKICAvVHlwZSAvUGFnZXMKICAv' +   'TWVkaWFCb3ggWyAwIDAgMjAwIDIwMCBdCiAgL0NvdW50IDEKICAvS2lkcyBbIDMgMCBSIF0K' +   'Pj4KZW5kb2JqCgozIDAgb2JqCjw8CiAgL1R5cGUgL1BhZ2UKICAvUGFyZW50IDIgMCBSCiAg' +   'L1Jlc291cmNlcyA8PAogICAgL0ZvbnQgPDwKICAgICAgL0YxIDQgMCBSIAogICAgPj4KICA+' +   'PgogIC9Db250ZW50cyA1IDAgUgo+PgplbmRvYmoKCjQgMCBvYmoKPDwKICAvVHlwZSAvRm9u' +   'dAogIC9TdWJ0eXBlIC9UeXBlMQogIC9CYXNlRm9udCAvVGltZXMtUm9tYW4KPj4KZW5kb2Jq' +   'Cgo1IDAgb2JqICAlIHBhZ2UgY29udGVudAo8PAogIC9MZW5ndGggNDQKPj4Kc3RyZWFtCkJU' +   'CjcwIDUwIFRECi9GMSAxMiBUZgooSGVsbG8sIHdvcmxkISkgVGoKRVQKZW5kc3RyZWFtCmVu' +   'ZG9iagoKeHJlZgowIDYKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDEwIDAwMDAwIG4g' + ...

Bootstrap modal close event using jquery

Solved: $(document.body).on('hidden.bs.modal', '#myModal', function () {             //do something });

add condition in jquery.tmpl.js

Solved: Add condition in tmpl jquery and remember its have closing tag {{if colName==''}}       <a class="hidden" href="${colName}">View</a> {{else}}       <a class="visible" href="${colName}">View</a> {{/if}}

scroll on top using jquery

Solved: $ ( 'html, body' ). animate ({ scrollTop : '0px' }, 300 ); you can set 0 instead of 300 its quickly go on top and you can change selector where you scroll means if you require scroll top to div just change selector and its working

Set span value using jquery and javascript

Solved: Jquery Example: you can set value two different function. 1- text(); 2- html(); $ ( "#submittername" ). text ( "testing" ); $ ( "#submittername" ). html ( "testing <b>1 2 3</b>" ); Difference between text and html functions text - you can set only value html - you can set value with html code but html tags not necessary for set the value JavaScript Example; you can set value from innerHTML document. getElementById ( "spanID" ).innerHTML. ( "testing" );

Find item in dropdownlist using jquery

var contain = false; $('#dropdownlist option').each(function(){     if (this.value == 'item-name') {         contain = true;         return false;     } });