Bump
Bump
or take out your onclick from your html and in your head put this
$(document).ready(function(){
$("#t").change(function(){
var v = $(this).val();
$("#test" + v).css("display","block");
You've no jQuery in there for a start.
Instead of
var c = document.getElementByID(f);
c.style.display = "block";
try
$("#"+f).show();
L
chuck wrote:
I am having some trouble getting some divs to display dynamically. Can
someone please offer a pointer?
hmm i tried your script and it works...altered it with a bind() an it
worked too
no idea sorry
Insert title here
.modalbox{
width:100%;
height:100%;
top:0px;
left:0px;
position:absolute;
background:#ededed url(modal_bg.png);
disp
Everything seems fine here, #me fades in and out perfectly. In IE you
have this #nojs blocking the whole screen (guess you're missing a $
('#nojs').hide() in your script) but taking it away the fade on #me
works right.
cheers
-- ricardo
ps: love urgent and annoying messages
On Jul 10, 7:17 am, M
So it sounds like you'd want to put a class like "hasOverlay" on the
homepage body.
Then, create the function that makes your overlay appear. This
function needs to be standalone, don't attach it to an event just yet
because we'll need to access it two different ways.
So your JS code would loo
maybe someone else can help. You said you had code to make it work from
button click. Would use similar code on page open also. Now I see 2
images and seems like all you need to do is swap images. Hard to do
without seeing markup, exisitng code.
Takaya213 wrote:
It is the exact same ove
It is the exact same overlay that has to show as open on the homepage and
closed on all of the other pages, but you can click on a button to show and
hide it as well.
That is the button that must show as selected/active when the overlay is
open and as unselected/inactive when closed.
Open Overla
shot in the dark here $("#overlay").show(). ??
Takaya213 wrote:
The button image has 2 states an on when it is active and an off when it is
inactive. I am not too concerned about this one, but more of the showing and
hiding of the overlay on page load.
Thanks.
Charlie T
The button image has 2 states an on when it is active and an off when it is
inactive. I am not too concerned about this one, but more of the showing and
hiding of the overlay on page load.
Thanks.
Charlie Tomlinson wrote:
>
>
> Can you put together a sample page link with your modal and give
Can you put together a sample page link with your modal and give a
better description of what you mean by button="off". Does this mean
disabled, or css change? Seeing what you are working with would make
finding the solution much easier
Takaya213 wrote:
Hi Can anybody help me please?
Tha
Hi Can anybody help me please?
Thanks
--
View this message in context:
http://www.nabble.com/Div-and-Button-display-as-active-and-open-only-on-certain-pages-tp24286826s27240p24318591.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.
The class solution would work fine.
As there is only 1 page that the overlay really needs to be open on and the
button active so a class function would be sufficient.
Charlie Tomlinson wrote:
>
> what are parameters to determine your "certain pages"? does this
> require an involved solution l
what are parameters to determine your "certain pages"? does this
require an involved solution like parsing url or would a simple
solution like adding class to body like "myOverlay" and use that as
selector in code to run overlay functions?
Takaya213 wrote:
Hi
I have a DIV overlay that I
> or a less efficient but explanative way:
>
> > > $('#plan').click(function(){
> > > //do stuff});
>
> > > $('#plan li').click(function(e){ //or #plan > *
> > > return false;
> > > //returning false calls e.stop
gt; //returning false calls e.stopPropagation() and e.preventDefault
> > ()
> > });
>
> > cheers,
> > - ricardo
>
> > On Apr 27, 10:26 am, Remon Oldenbeuving
> > wrote:
>
and e.preventDefault
> ()
> });
>
> cheers,
> - ricardo
>
> On Apr 27, 10:26 am, Remon Oldenbeuving
> wrote:
>
> > It looks obvious, but aint working for me.
>
> > On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva <
>
> &g
i').click(function(e){ //or #plan > *
> return false;
> //returning false calls e.stopPropagation() and e.preventDefault
> ()
> });
>
> cheers,
> - ricardo
>
> On Apr 27, 10:26 am, Remon Oldenbeuving
> wrote:
>
> > It looks obvious, but aint w
On Apr 27, 10:26 am, Remon Oldenbeuving
wrote:
> It looks obvious, but aint working for me.
>
> On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva <
>
> css.mau...@gmail.com> wrote:
>
> > De: "gostbuster"
> > Assunto: [jQuery] Re: div contai
It looks obvious, but aint working for me.
On Mon, Apr 27, 2009 at 3:16 PM, Mauricio (Maujor) Samy Silva <
css.mau...@gmail.com> wrote:
>
>
> De: "gostbuster"
> Assunto: [jQuery] Re: div contains -> select div but NOT li
> Hi,
> Yes of course I could do t
De: "gostbuster"
Assunto: [jQuery] Re: div contains -> select div but NOT li
Hi,
Yes of course I could do this, but Jquery selectors don't allow what I
wish to do?
Thanks.
--
How about:
$('
what you are doing is called event delegation, there's more to it than
simple selectors . You could be clicking in the div but not on an li or
clicking on the contents of an li. That's what was meant by " //You
will have to check whats the real target " for a list item
$('#plan').click(funct
Hi,
Yes of course I could do this, but Jquery selectors don't allow what I
wish to do?
Thanks.
On 27 avr, 14:25, Remon Oldenbeuving
wrote:
> You could use the event object thats being passed when a click event fires?
>
> $('#plan').click(function(e){
> if(e.target !== "liobject"){ //You will
You could use the event object thats being passed when a click event fires?
$('#plan').click(function(e){
if(e.target !== "liobject"){ //You will have to check whats the real target
for a list item
//here your code
}
});
On Mon, Apr 27, 2009 at 2:08 PM, gostbuster wrote:
>
> Okay I'll try to
Okay I'll try to explain better.
Imagine an image, it's a rectangle.
you can have a div with this image for background :
like this :
Then, with CSS, you can do this :
#plan{
background:url(my image url);
width : image width;
height: image height
}
Well, my image is representing
your question isn't very clear . If you are trying to select based on
what is inside the div these should help:
$("div:contains("Some Text")).// do something
or
$("div:has(li[class=something])").// do something
http://docs.jquery.com/Selectors
need to be more specific what you are trying
yes, I´ve checked the docs. I just remember that I´ve been reading it
somewhere lately ... but maybe I´m wrong.
thanks.
On 3 Apr., 17:01, MorningZ wrote:
> Not sure if that's possible, the documentation makes no references to
> be able to do so
>
> http://docs.jquery.com/Selectors/descendant#a
Not sure if that's possible, the documentation makes no references to
be able to do so
http://docs.jquery.com/Selectors/descendant#ancestordescendant
On Apr 3, 10:44 am, patrickk wrote:
> hmm. that´s not what I mean - I thought the ancestor (using a ancestor
> - descendant selector) can be ret
hmm. that´s not what I mean - I thought the ancestor (using a ancestor
- descendant selector) can be retrieved without using another DOM-
lookup.
On 3 Apr., 16:24, MorningZ wrote:
> how about
>
> $("div:has(a)").each(function() {
> var $div = $(this); //Here's the div
> var
how about
$("div:has(a)").each(function() {
var $div = $(this); //Here's the div
var $a = $div.find("a");//Here's the link
})
On Apr 3, 9:56 am, patrickk wrote:
> when using something like:
>
> $('div a').each(function() {
> // what´s the easiest way to get the "DIV"
If I'm correct, your callback inside your show() function cannot
include parameters.
Instead of:
$('#profile_' + id).show("slow", hideAllProfile(id));
Use:
$('#profile_' + id).show("slow", function() {
hideAllProfile(id);
});
On Feb 3, 1:22 am, Paresh wrote:
> Is there any way to set the
Div's require a position attribute before they will obey a z-index
rule. Make sure your div has position:relative; or position:absolute;
or position:fixed;
On Feb 3, 6:22 am, Paresh wrote:
> Is there any way to set the z-index of the div?
>
> I have series of hidden DIVs (in each row of table an
That sounds like the 'div float' situation - where the container div
doesn't enclose it's floated content without some un-floated element
following the floated elements:
obladi
oblida
life goes on
On Jan 24, 8:27 am, Ant wrote:
> In IE7, if a div height in not specified, the div fails to show
Thank you for all the help. The documentation is great.
I've been through quite a few of the tutorials/articles, but I still
feel that I do not have the tools to control any div with any link
proper. I feel that Mike Alsup's post was on the right track, but, it
seems, too much was expected to know by a noob like me. How would the
code listed in post #2
> Where would the code that you've listed go?
jQuery is really designed to be separate from the HTML content; so
with that being said, it is typically found in the head section of the
document.
Now, you can't just put that in the head section and expect it to
work, because it will fire before th
Another example place to get started, and don't be thrown off that
it's for an old version of the framework, his code is still very much
valid:
http://15daysofjquery.com/quicker/4/
On Dec 14, 4:47 pm, "Michael Geary" wrote:
> There are all sorts of good tutorials on jQuery.
>
> Did you find
There are all sorts of good tutorials on jQuery.
Did you find the main documentation page? Here it is:
http://docs.jquery.com/
You'll see a link on the left to a page that lists a number of tutorials.
Go through a few of them and you'll be up to speed in no time!
-Mike
> From: Shaun Culver
Thank you for your response. I'd be grateful if you'd be so kind as to
help me get on my feet. I am new to jQuery (and javascript/ajax
frameworks).
I know that the main library file needs to be included:
Where would the code that you've listed go?
What would the "a href" tag look like that cal
> I would like to know how to use jQuery to control (create, delete,
> update, toggle, animate, etc.) divs. I have been searching, but never
> find anything satisfactory.
Can you be more specific?
// create
var $div = $('hello world');
// add to dom
$div.appendTo('body');
$div.prependTo('#other
Try putting some logging in the .load callback, on the ct
variable...make sure it's getting bound correctly.
On Dec 4, 2:19 pm, Polskaya <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am trying to load content from another file in several divs on one
> page.
> If i use this script:
>
> var ct=0;
> $(".
Padding and borders are added to the width. Is that the difference you are
seeing?
-Hector
On Fri, Nov 7, 2008 at 10:16 AM, nmiddleweek <[EMAIL PROTECTED]>wrote:
>
> hello,
>
> What is the best way to work out the real width of an object?
>
> I'm toggling the display:inline/none of a DIV and an
> Hey, what's the name of this list? jQuery English??? ...
Sorry, forgot, next time, I promise :-)
Ralf
>
> thanks
> Neto
> --
> Antonio Marin Neto
> Sun Certified Programmer for Java 2 Platform 1.4
>
> Blog:http://netomarin.blogspot.com
> Blog:http://weblogs.java.net/blog/netomarin/
> GTalk: [EM
Hey, what's the name of this list? jQuery English??? ...
thanks
Neto
--
Antonio Marin Neto
Sun Certified Programmer for Java 2 Platform 1.4
Blog: http://netomarin.blogspot.com
Blog: http://weblogs.java.net/blog/netomarin/
GTalk: [EMAIL PROTECTED]
Skype: netomarin
On Fri, Oct 3, 2008 at 2:37 PM,
Du hast das schon richtig erkannt: "Geht aber nicht, da append wohl
ein vollständiges Element erwartet..."
also musst du alles in einem string schreiben:
$("#container").append('');
wenn du aber immer 2 unterschiedliche bilder haben willst und die
neuen nicht einfach untendrunter gehängt werden
I would use three separate click handlers rather than letting the
events bubble up and handling them at the top-level document. Event
delegation can be useful but it doesn't seem necessary for this case.
I think the real problem is that you are hiding the #loading element
without waiting for the
Ariel beat me to what I was going to say! VERY bad idea if you want to
register in search engines
Liam
Ariel Flesler wrote:
Ok then:
$('div.box[title]').each(function(){
$('').text( this.title ).prependTo(this);
});
Note that you're giving non-js users (and search engines) less
seman
Ok then:
$('div.box[title]').each(function(){
$('').text( this.title ).prependTo(this);
});
Note that you're giving non-js users (and search engines) less
semantical html.
You probably want google to recognize (sub)titles on your pages.
--
Ariel Flesler
http://flesler.blogspot.com/
On Aug 2
Thanks for the reply, but I think what you did was take the first way
and convert it to the second. I think anyway, I gave it a shot just
in case and it didn't end up as desired.
What I'd like to do is start writing my "box" divs like the second way
(without the nested h3 and div) so there's les
Whether or not this should be done, I don't know. It modifies the way
the user gets the title (much more subtle/hidden the second way).
How to do this ?
$('div.box').each(function(){
this.title = $(this).find('h3').remove().attr('title') || '';
});
--
Ariel Flesler
http://flesler.blogspot.co
Just use javascript:
var x = this.offsetLeft;
var y = this.offsetTop;
Legster <[EMAIL PROTECTED]> wrote:
Is there an easy way to find the current X, Y location of any div
area?
Example of what I am trying to find:
$(this).xpage
or
$("#mainDiv").ypage
Those currently retur
Are you looking for "offset" ?
http://docs.jquery.com/CSS/offset
Brian.
On Mon, Mar 24, 2008 at 10:54 AM, Legster <[EMAIL PROTECTED]> wrote:
>
> Is there an easy way to find the current X, Y location of any div
> area?
>
> Example of what I am trying to find:
> $(this).xpage
>
> or
>
> $("#main
Very kewl, but any tips on getting the key up / key down navigation
hooked up as well?
On Feb 16, 10:02 am, George <[EMAIL PROTECTED]> wrote:
> > jQuery being what it is, there's bound to be a way of doing
> > this in one line, though :)
>
> $(this).addClass("highlight").siblings().removeClass(
This is quite generalized and is bookmarkable...
- http://enure.net/dev/hide-all-except-one/
On Fri, Feb 22, 2008 at 6:50 AM, J Moore <[EMAIL PROTECTED]> wrote:
>
>
> good tips so far.
>
> I just wanted to add that using classes and ids works well.
>
> show blackbook
> show redbook
>
> bla
good tips so far.
I just wanted to add that using classes and ids works well.
show blackbook
show redbook
blackbook stuff...
redbook stuff...
This makes your click function simpler.
$('a.show').click(function(){
hide_divs();
var x = $(this).attr('id');
$('#'+ x + '-content').show
you could use $.delegate
http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery
I haven't used it yet but it looks like life has just gotten easier.
On Feb 21, 5:03 pm, Sientz <[EMAIL PROTECTED]> wrote:
> I created this script to hide and show divs on a web page I am working
> on
On 21 Feb, 23:03, Sientz <[EMAIL PROTECTED]> wrote:
> $('a#blackbook').click(function() {
> //HIDE DIVS
> hide_divs();
> //SHOW LISTED DIV
> $('.blackbook').show('fast');
> return false;
> });
you see you got all these functions that basically do the same thing.
if an anch
> jQuery being what it is, there's bound to be a way of doing
> this in one line, though :)
$(this).addClass("highlight").siblings().removeClass("highlight")
...that saves a document wide search for $(".section")
Geoge
Here is what I have, but the key event do not work?
.section {
border:1px solid silver;
background:#EEE;
margin:-5px;
}
.highlight {
border: 1px solid red;
background: #FFCC99;
}
$(function(){
// selected Item function
var selectedItem = null;
var setSelectedItem = function(item) {
Can someone suggest a way to add some keycode events to this?
up-arrow and down-arrow actions?
On Feb 16, 6:31 am, yabado <[EMAIL PROTECTED]> wrote:
> Michael,
>
> I had to change some things but this works...
>
>
> $(function(){
>
> $('#switcher .section').click(function() {
> $('#swit
Michael,
I had to change some things but this works...
$(function(){
$('#switcher .section').click(function() {
$('#switcher .section').removeClass('highlight');
$(this).addClass('highlight');
});
});
On Feb 15, 8:46 am, Michael Price <[EMAIL PROTECTED]> wrote:
> yabado
Thanks, exactly what I needed. :-)
On Feb 15, 8:46 am, Michael Price <[EMAIL PROTECTED]> wrote:
> yabadowrote:
> > Stuff
> > Stuff
> > Stuff
> > Stuff
> > Stuff
>
> If this isn't pseudo-code then you've got your IDs and classes the wrong
> way round here, I think...
>
> Anyway, the
yabado wrote:
Stuff
Stuff
Stuff
Stuff
Stuff
If this isn't pseudo-code then you've got your IDs and classes the wrong
way round here, I think...
Anyway, the way I usually do it (and someone will be along shortly with
a better method, I don't doubt, but it works for me) is have
I'm working with divs
When a image is clicked, I clone the first criteria, clear it, and
append to the main div.
It goes to the bottom, its ok so far, no problem.
But, in some criteria, if in a combobox is selected a specific item, it
will trigger the above clone code, know it need to insert b
Can you post a little more info? Maybe some of your html code that
goes along with what jquery is working with? Are you trying to add a
new criteria text box to a search form when #new-criteria is clicked?
Are you working with table cells or divs?
On Feb 12, 3:14 pm, Feijó <[EMAIL PROTECTED]> wro
Thanks to Stephan & Wizzud for both answers.
I think I have it figured out now, atleast it looks ok & works fine
for me in firefox on linux, if anyone reading this on any other
platform/browser can let me know if you are seeing any problems, i'd
appreciate it.
I'm now using an extra div with backr
Thanks to both Wizzud & Stephan, I think I now have it working as I
want.
Using an extra div with background images, works for me in firefox on
linux, if anyone reading this on another platform/browser spots any
problems, please let me know.
Of if anyone needs help with the same solution, I will d
As an example:
CSS
img.showhide {width:12px; height:12px; background:#ff
url('hide.jpg') no-repeat;} // if DIV is currently NOT hidden
img.showhideShow {background-image:url('show.jpg');} // if DIV is
currently hidden
or you can put both the show and hide images in the same graphic jpg
file
On Sep 13, 2:33 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> what i'd like to do is change the (x) link to an image which changes
> when that div is hidden.
> you can see it in action here:http://propertyireland.net
> any ideas?
One approach is not to use a text (x), but to use an image
Pop,
you can also finetune this presentational behavior via css: white-space:
no-wrap / pre / auto
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Pops
Sent: mardi 28 août 2007 23:39
To: jQuery (English)
Subject: [jQuery] Re: DIV clipping
Feed wrote:
Yes, Firefox does this. I'm not sure if it's a bug or a feature,
though. I don't think Firefox, which is known for it's good standards
compliance, would suffer from such a stupid bug. Or maybe I'm
wrong. :)
Nowhere in the spec (up to CSS 2.1) is defined how to handle wrapping
long
Yes, Firefox does this. I'm not sure if it's a bug or a feature,
though. I don't think Firefox, which is known for it's good standards
compliance, would suffer from such a stupid bug. Or maybe I'm
wrong. :)
On Aug 28, 5:27 pm, seedy <[EMAIL PROTECTED]> wrote:
> Is the text you are trying to displ
HA!!! That was it.
The JSON data did not have any spaces. I added a space before each
field and viola, it is auto-fitted when you resize the window!
Amazing, freaking amazing. :-)
Thanks
--
HLS
On Aug 28, 4:27 pm, seedy <[EMAIL PROTECTED]> wrote:
> Is the text you are trying to display
> on
Is the text you are trying to display
onereallylongstringthatdoesnotcontainanyspaces???
I believe Firefox has a bug that prevents it from wrapping text that does
not have a space in it, I often run into that problem when trying to display
URL's in firefox.
Pops wrote:
>
>
> I have a contain
As far as I know, nothing works but window.onresize
On 5/31/07, Glen Lipka <[EMAIL PROTECTED]> wrote:
Is there a way of putting a listener on a DIV that listens for it's height
changing?
Resize didnt do it I think.
Glen
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
Damn you guys are fast. I deleted the post almost immediately -
server problems :)
also make sure your '$' namespaces are not getting messed up. take out other
javascript libraries you might have just to test.
- Original Message
From: Alexandre Plennevaux <[EMAIL PROTECTED]>
To: jquery-en@googlegroups.com
Sent: Tuesday, April 24, 2007 4:57:46 AM
Subj
This should work !!
$('#language').hide();
If your html is :
...
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of agent2026
Sent: mardi 24 avril 2007 11:03
To: jQuery (English)
Subject: [jQuery] $('#div').hide(); - ?
Some time off from
agent2026 wrote:
Some time off from jQuery, and it seems I'm just broken. Why can't I
get this hide() to work?
Would that be because you've not closed the double-quotes in the
80 matches
Mail list logo