Hi;
I am new in jQuery and also not well in JavaScript enough...
I have been developing a modified version of jCarousel plugin of jQuery...
I try to tell the problem with code:
function loadItemHandler(carousel, start, last, available)
{
if (available) {
// Trigger loaded
carousel.loaded();
return;
}
var cr = carousel;
var cid = '';
$("#lin").hover(function() {
jQuery(this).css({color:"red",cursor:"pointer"}); },
function() {
jQuery(this).css({color:"green",cursor:"pointer"}); }
);
$("#lin").click(
function() //section 1
{
cid = $(this).attr("cid");
jQuery.get("components/com_creme/creme.ajax.php?cid="+cid, function(data)
{
appendItemCallback(cr, start, last, data);
});
},
function() //section 2
{
jQuery.get("components/com_creme/creme.ajax.php", function(data) {
appendItemCallback(cr, start, last, data); });
}
)
};
There are span tags with id=lin and a cid attribute whose value is
variable. ( example : <span id="lin" cid="5">test</span> )
I try to succeed that when nothing is clicked section 2 must be runned,
otherwise section 1 must be runned when any link clicked.
Note: After clicking any link section 2 mustnot be runned
tHanks for any help and sorry for my bad English...
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/