03-08-2008, 01:26 PM
|
#1 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Posts: 360
Thanks: 24
|
Expected an assignment or function call and instead saw an expression?
Problem at line 12 character 12: Expected an assignment or function call and instead saw an expression.
this.todo;
Strange. Why does jslint.com errors out?
Code:
jQuery(document).ready(function() {
/**
* sliceDo iterates slice array, evalutes the toDo array as javascript under click event for each slice based on slice index.
* @param array slice
* @param array toDo
*/
sliceDo = function(slice) {
jQuery.each(slice, function(index, value) {
jQuery(value).click(function(){
return false;
});
this.todo;
});
};
// Array of slices of Pie Menu
slice = jQuery('#pie').children();
// Work to be done by the slices
var work = {
todo: jQuery(slice[1]).mouseover(function(object) {
menuOffset = jQuery('.pie_menu').offset();
jQuery('#pie_right').show().css({top: menuOffset.top + 50 + 'px', left: menuOffset.left + 140 + 'px'});
}).mouseout(function() {
jQuery('#pie_right').hide();
})
};
sliceDo.apply(work, [slice]);
jQuery('.search-results > li').children().click(function(object){
jQuery('.pie_menu').show().css({left: object.pageX + "px", top: object.pageY-10 + "px"});
return false;
});
});
__________________
Necessity is the mother of invention.
My blog
|
|
|
|