對不起張貼了類似我的前一個職位,但我認爲我的解釋並不好。jQuery和CakePHP的 - 如何傳遞參數在我的jQuery函數
其實,我有我的觀點的CakePHP
這適用於特定視圖使用jQuery函數。
我希望能夠通過傳遞參數(我想要的jQuery函數爲運行的div id來使用與其他視圖這個jQuery功能。
我的問題是,它的變化,我需要在我的功能做,以它的工作原理,以及如何將它從我的觀點(語法請)調用。
我希望這個網站的專家幫助,我不能在文檔中找到答案。
這裏是我的jquery功能
$(function
{
// Hide the first cell for JavaScript enabled browsers.
//$('#link-data td:first-child').hide();
$('#moreWrapper ').hover(function()
{
$(this).toggleClass('Highlight');
});
// run after page loads
$("#more").hide();
// Assign a click handler that grabs the URL
// from the first cell and redirects the user.
$('#moreWrapper ').click(function()
{
$(this).toggleClass("active").next().slideToggle(100);
return false; //Prevent the browser jump to the link anchor
});
});
0在這種情況下,「moreWrapper」,然後就迴應:
除非有一些顯著不同 - 請編輯你的存在的問題。 – AD7six
[在cakephp的查詢函數中傳遞參數]的可能重複(http://stackoverflow.com/questions/17578971/passing-parameters-in-query-function-in-cakephp) – AD7six