[jQuery] jquery - adding flexibility to a function

2008-08-31 Thread TheOriginalH
function loadContent(id) { $("#contentArea").load("rpc.php?o="+id+""); } Works well, but I'd like the function to work for an area with a variable div. So if the function is called with an id of 6, it loads the content to "#contentArea6". Any ideas on h

[jQuery] Ajax load to revealed content area.

2008-08-31 Thread TheOriginalH
I have the following code which nicely displays a list for me: $(document).ready(function() { $('dl> dd').hide(); //$('dl.menuleft> dd:gt(0)').hide(); use this if you want the first one to stay opened $('dl> dt').click(function() { if($(this).find("a").attr("href")){}else{ var $nextDT = $(th

[jQuery] Re: Targeting pseudo classes with jQuery

2008-03-07 Thread TheOriginalH
Class('aSelected'); >$(this).addClass('aSelected'); > > } > > $('.someElements').hover( > function(){ > $(this).addClass('aHover') }, > function() { > $(this).removeClass('aHover'); >

[jQuery] Targeting pseudo classes with jQuery

2008-03-06 Thread TheOriginalH
I have a menu which is working nicely. When an item is clicked, I'm using jQuery to change the CSS color to indicate it is current. To keep things neat, I have also changed the color of all similar items back to the default (otherwise ALL items would be highlighted as you went through the menu. U

[jQuery] Re: Vertically aligning a div

2008-03-06 Thread TheOriginalH
en implenting, you'd do the usual MS hacks, then let this take > over. > > Other possible extensions: maybe an option to centre to parent > element > as well as window, un-centre, offsets etc. > > On Mar 6, 11:31 am, TheOriginalH <[EMAIL PROTECTED]> wrote: > > >

[jQuery] Vertically aligning a div

2008-03-05 Thread TheOriginalH
Hi, very new to jQuery, but suspect it can probably help me out. I have a div of a fixed height (auto scroll where content exceeds that height), that I would like to center vertically on the page. I'm assuming I can use jQuery to work out the height of the browser window, subtract the height of t