Fantastic Michael, that works perfectly & helps me cut down my code in
so many other places too...
Thank you.
On May 22, 3:09 am, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> 30 should be fine, but if you find that startup time is an issue, you can
> use a single event handler on a parent element
Thanks Mike,
that looks good...
A bunch could be up to 30, would that be an issue?
On May 22, 2:41 am, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> Something like this would do the trick...
>
> $('#divid_link').click(function() {
> $( '#' + this.id.replace( /_link$/, '' ) ).hide();
>
> });
>
Hi All,
I have a bunch of links that I need to assign ID's to automatically
through php.
However, some of these ID's are already taken by some divs so are
causing conflicts.
I am thinking of adding_link to these new link ID's, so they now
have an ID likedivid_link
I want to hide the corr
Thanks Hamish, works perfectly...
On May 22, 1:46 am, Hamish Campbell <[EMAIL PROTECTED]> wrote:
> if ( $('.box:visible').length == 0 ) {
> $('#left').hide();
>
> On May 22, 12:13 pm, thekman <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
Hi all,
I have a bunch of divs on my page that all have a class of box, the
boxes can be hidden by the div id, so when all are hidden, i also want
to hide their parent div - left
the code below hides the parent div as soon as one box is hidden, but
i don't want to do this.
Any ideas on how I would
age to my code is that it
> saves converting 'this' into a jQuery object twice - once to find the
> class, and then again to remove itself.
>
> On May 21, 9:52 am, thekman <[EMAIL PROTECTED]> wrote:
>
> > Hi Wizzud,
> > Just wondering if there is any per
Hi Wizzud,
Just wondering if there is any performance/browser compatibility or
any other reason you changed:
var $this = $(this).attr("class");
$('#'+$this).show();
to
var $this = $(this);
$('#'+$this.attr('class')).show();
On May 21, 9:38 am, thekma
t; if(!$('#hiddenleft a').length){
> $('#hiddenleft,#hiddencontent').hide();
> }
> });
>
> On May 20, 3:52 pm, thekman <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
> > I am removing links from a div when they are clicked on using the
Hi all,
I am removing links from a div when they are clicked on using the code
below:
$('#hiddenleft a').livequery('click', function() {
var $this = $(this).attr("class");
$('#'+$this).show();
$(this).remove();
});
when all links are removed, i wa
got it fixed by using the livequery plugin on the newly created links.
On May 19, 11:39 pm, thekman <[EMAIL PROTECTED]> wrote:
> sorry, that last bit of code has
> append not add in the line below.
> however i'm still stuck, the link does nothing when clicked on u
sorry, that last bit of code has
append not add in the line below.
however i'm still stuck, the link does nothing when clicked on until a
page reload...
$('#hiddenleft').append(''+boxName+'');
On May 19, 11:07 pm, thekman <[EMAIL PROTECTED]> wrote:
Hi all,
I am trying to add links to a div when another div is clicked.
The links get added fine, but they do not work when clicked. However i
am also saving the value to a cookie & display them on page refresh,
at this stage they do work as expected.
Any ideas on how I can get the links to work ju
hed my response and mixed up two different approaches that I
> was going suggest. Let me know if you need any more help.
>
> On May 15, 9:05 pm, thekman <[EMAIL PROTECTED]> wrote:
>
> > Hi Scott, got to play around with it a little & have some if it
> > figure
Got it working with some help from James over on
http://www.jdempster.com/2007/08/11/jquery-cookiejar/#comment-154
On May 16, 2:05 am, thekman <[EMAIL PROTECTED]> wrote:
> Hi Scott, got to play around with it a little & have some if it
> figured out, thanks.
> the json_encod
t;box4":"closed"}
so any idea where I go from here?
On May 15, 3:06 pm, thekman <[EMAIL PROTECTED]> wrote:
> Thnaks Scott,
> but no idea yet how to do that.
> any chance you could provide a short example i could play with & try
> to get working?
>
> On
ctly in PHP using the $_COOKIE superglobal. After the
> loop, create your script. You can generate a JavaScript array from
> your PHP array using json_encode(). Just pass that array in as the
> selector for the jQuery object and you'll end up with just one line if
> JavaScript.
&
Hi all,
I'm using cookies to hide some content on page load & at the moment
the jQuery code to do this inside a php loop, so the code below gets
executed up to 20 times.
any ideas on how i would include this only once to hide all content
supposed to be hidden?
...
while (!$display->EOF and $cnt <
try superfish,
http://users.tpg.com.au/j_birch/plugins/superfish/
play around with the stylesheet & you should get what you want...
On May 13, 11:49 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Notice on this site --http://www.nascar.com/, when you roll over an
> item in the top
fixed it, just had to add return false; to the click function.
On May 12, 3:19 pm, thekman <[EMAIL PROTECTED]> wrote:
> Hi & thanks again for your help Dave.
> Do you know of a better way to do this bit?
>
> div>Reviews
>
> i am using the href as i want to use
Hi & thanks again for your help Dave.
Do you know of a better way to do this bit?
Reviews
i am using the href as i want to use a hover image, but if it is far
down the page & a user clicks on it to show/hide the content, the
browser scrolls back to the top of the page.
any ideas?
On May 12, 1:
Thanks a million Dave,
both examples work a treat...
I just had to remove the extra . after $this in (example 1)
and in example 2, remove the extra . between addClass(togv[1]).
.parents(
and change my layout code to rather than
it now works as expected...
so thanks again...
Hi Dave,
Below is the code...
$('.min').click(function() {
$
(this).removeClass("min").addClass("max").parents(".Container").children(".Content").hide();
$.cookie($(this).parents(".Container").attr("id"), 'closed',
{ expires: 7 });
});
$('.max').click(function() {
$
(this).removeClass("max").ad
hi all,
i am using the code below to hide some content, the first part works
ok & hides the content as expected but i cant get the second part to
work - i.e. showing the content again - any ideas?
i don't want to use toggle as i am displaying the content based on a
cookie value & when the cookie i
looks great...
however i have 2 issues that i can't seem to fix.
when i click on the image, it always displays further down the page,
then the previous & next always pushes that image even further down
the page.
also, when the caption for the image is larger than the image, it
truncates.
you can s
Hi Shawn,
got it with:
$(this).parent().siblings(".boxcontent").hide();
thanks...
On Apr 24, 1:54 pm, thekman <[EMAIL PROTECTED]> wrote:
> Thanks Shawn,
> however it is still not working for me, I presume because .boxcontent
> is not a sibling of .closeimage_lef
TED]> wrote:
> oops.. that should probably be a .toggle() instead of a .hide()
>
> Shawn
>
> Shawn wrote:
>
> > $(".closeimage_left").click( function () {
> > $(this).siblings(".boxcontent").hide();
> > });
>
> > That *should* do th
<[EMAIL PROTECTED]> wrote:
> oops.. that should probably be a .toggle() instead of a .hide()
>
> Shawn
>
> Shawn wrote:
>
> > $(".closeimage_left").click( function () {
> > $(this).siblings(".boxcontent").hide();
> > });
>
> > T
Hi all,
I have code something like:
Box Title
Box Title
box content...
Box Title
Box Title
box content...
All numbers are dynamically generated from the database.
What is the best way to use jquery to close the correct content div?
I am presuming I would use something like
28 matches
Mail list logo