JavaScript How to make a function for button onclick option from javascript make function button excel,make button function,make button function

This is the javascript for ajax html popup

<script type="text/javascript">
$(document).ready(function() {

    $('.ajax-popup-link').magnificPopup({
        type: 'ajax',
        overflowY: 'scroll',
        closeOnContentClick: false
    });

});</script>

This is the button code

<input id="btn" type="button" value="click" onclick="myFunction();"/>

I have a popup html file name test.html which i need to open as popup on button click

Answer:1

Tie your ajax code to myFunction() like:

function myFunction(){ 
// your code 
$('.ajax-popup-link').magnificPopup({
    type: 'ajax',
    overflowY: 'scroll',
    closeOnContentClick: false

});
}

or remove the onclick from html input and add this to your script

$( "#btn" ).click(function() {
 $('.ajax-popup-link').magnificPopup({
    type: 'ajax',
    overflowY: 'scroll',
    closeOnContentClick: false
});
});
Answer:2

I try to remove the duplicate value before storing it into a store. I want to store the same value in the store 1 time only. But it seems the following Ext.Array.unique line does not working. Could ...

I try to remove the duplicate value before storing it into a store. I want to store the same value in the store 1 time only. But it seems the following Ext.Array.unique line does not working. Could ...

  1. extjs remove duplicate records from store
  2. extjs remove duplicates from store
  3. extjs remove duplicates from array
  4. extjs remove duplicates
  5. extjs combobox remove duplicate

So I have a header.. and an image. On tablet I want to be able to pinch and zoom into the image but i'm struggling. I've looked at other similar questions. But as I'm still learning, i'm not fully ...

So I have a header.. and an image. On tablet I want to be able to pinch and zoom into the image but i'm struggling. I've looked at other similar questions. But as I'm still learning, i'm not fully ...

  1. pinch zoom using hammer.js
  2. hammer.js pinch zoom
  3. pinch zoom hammerjs

Let's say I have something like this: <div ng-app="myApp"> <div ng-controller="myCtrl"> {{foo}} <button ng-click="bindToMe" /> </div> <div ng-...

Let's say I have something like this: <div ng-app="myApp"> <div ng-controller="myCtrl"> {{foo}} <button ng-click="bindToMe" /> </div> <div ng-...

  1. programmatically bind combobox c#
  2. programmatically bind datagridview c#
  3. programmatically bind visibility
  4. wpf programmatically bind property
  5. wpf programmatically bind dependency property
  6. objectdatasource programmatically bind
  7. wpf programmatically bind
  8. bind gridview column programmatically c#
  9. vue bind programmatically
  10. angular bind programmatically
  11. knockout data-bind programmatically
  12. wpf datagrid bind programmatically
  13. nsarraycontroller bind programmatically
  14. v-bind programmatically
  15. c# bind programmatically
  16. cocoa bind programmatically

I'm Very stuck in this case when working all day :(. please help me. I have website need using $http provider to call ColdFusion file from other domain. let's say this is link to cfm file : http://...

I'm Very stuck in this case when working all day :(. please help me. I have website need using $http provider to call ColdFusion file from other domain. let's say this is link to cfm file : http://...