2

Can someone explain me why i got error !?

<link rel="icon" href="http://designshack.net/favicon.ico">
<link rel="stylesheet" type="text/css" media="all" href="style_modle.css">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.leanModal.min.js"></script>

And this is All script i using in head :

<link href="css/jnice.css" type="text/css" rel="stylesheet"/>
<link href="css/jquery.selectbox.css" type="text/css" rel="stylesheet"/>
<link href="css/style.css" type="text/css" rel="stylesheet"/>
<link href="fancybox/jquery.fancybox-1.3.4.css" type="text/css" rel="stylesheet"/>
<link href="vidplayer/video-js.css" type="text/css" rel="stylesheet"/>
<!-- Added to loanModle   -->
<link rel="icon" href="http://designshack.net/favicon.ico">
<link rel="stylesheet" type="text/css" media="all" href="style_modle.css">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.leanModal.min.js"></script>
<!-- END Added to loanModle END   -->
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>
<script type="text/javascript" src="js/jquery.selectbox-0.2.min.js"></script>
<script type="text/javascript" src="js/mod_radio.js"></script>
<script type="text/javascript" src="js/jquery.flip.js"></script>
<script type="text/javascript" src="fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="vidplayer/video.js"></script>
<link href='http://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'/>
<script>

This is my BODY :

 <div id="content">
     <center><a href="#loginmodal" class="flatbtn" id="modaltrigger">About Us</a></center>
  </div>
  </div>
  <div id="loginmodal" style="display:none;">
     <p>Text text text ! <a href="http://Satisfactionscript.pl">Satisfactionscript.pl</a> </p>
  </div>
<script type="text/javascript">
$(function(){
  $('#loginform').submit(function(e){
    return false;
  });

  $('#modaltrigger').leanModal({ top: 110, overlay: 0.45, closeButton: ".hidemodal" });
});

And "Uncaught TypeError: Object #<Object> has no method "leanModal" is showing in here :

$('#modaltrigger').leanModal({ top: 110, overlay: 0.45, closeButton: ".hidemodal" });
    });

The TableModel interface defines the how the data can interact with the JTable. There are two classes that implement the TableModel interface - the DefaultTableModel and the AbstractTableModel. The AbstractTableModel implements the majority of the methods defined in the TableModel interface and leaves three methods (getRowCount, getColumnCount, getValueAt) which must be implemented by a subclass. It's the basis for any custom table model a programmer might create. The DefaultTableModel class is such an implementation. It is a subclass of the AbstractTableModel with the three methods implemented where the data is stored in a Vector of Vectors.

By using your own custom table model built from the AbstractTableModel you can choose to store the data however you want to but you'll need to implement the methods that allow the data to interact with the JTable seamlessly. How many methods will depend on how much the JTable needs to manage the data. For a read-only JTable then the three default methods mentioned above are enough. But for a JTable that allows extensively editing (e.g., adding and removing rows and columns) then these methods will need to implemented to reflect the changes in the data that's been stored in the table model.

Courtesy - http://java.about.com/od/Creating-Tables/a/The-Jtable-Table-Model.htm

4

1 回答 1

3

你包括 jQuery 两次。

<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.leanModal.min.js"></script>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>

取出1.7.2版本再试。

为清楚起见进行编辑:首先包含 jQuery 1.9.1,然后$变成 jQuery 1.9.1。然后你加载leanModal,它成为jQuery 1.9.1 的插件。然后你加载 jQuery 1.7.2,并$成为一个全新的 jQuery 1.7.2,它没有leaModal 插件。然后你尝试调用leanModal插件,它不再存在于$.

于 2013-10-29T17:34:35.310 回答