On Feb 8, 11:11 am, cbmtrx <[EMAIL PROTECTED]> wrote: > I've just barely started getting my feet wet with jquery, so please > bear with this novice's question... > > With a javascript function you can accept vars like this: > > function doSomething(number, name) { > //Do something with them > > }
> From an href in the HTML like this: > <a href="javascript:doSomething('1234','john');>Click me</a> > > But I have no idea how this is accomplished with jquery as it all > seems "internal" to itself (seemingly dealing only with identifying > HTML tags, ids, and classes, and not user-supplied vars). I'm sure I'm > wrong on this... I think there is nothing really new about it..You can just do it in the same way using jQuery, function doSomething(number, name) { //Just do something with them using jQuery's syntax, like $('div#target').load('fireAction.html', { name : name || 'default_name', number : number || 'default_number' }); } (untested) lihao(XC) > I had started to build out a page that will be using multiple show/ > hide toggles for individual divs/ids and the jquery examples I was > finding all seemed more long-winded than just using my original > javascript function, so I'm hoping that this would considerably > simplify the process, but, more importantly, keep it native to > jquery's functions. > > Any suggestions?