[jQuery] Re: Superfish - Nav-bar style with bgIframe?

2008-12-24 Thread SLR
No dice, I'm afraid. The only change was that it generated white, drop- down arrows again. Thank you for trying to help me out. I'm going to create a test environment later today, with the same settings and files, but without being embedded in one of my pages. I think bgIframe may have a

[jQuery] Re: Superfish - Nav-bar style with bgIframe?

2008-12-22 Thread SLR
The initiation: $(document).ready(function(){         $(ul#sf-menu-id).superfish({                 autoArrows:  false,                 pathClass:  'current'         }).find('ul').bgIframe(); }); Try changing your document.ready statement to this: $(document).ready(function(){

[jQuery] Re: submit a form with a link

2008-12-22 Thread SLR
I'm using jquery to validate a form and that I'm using this link to to the submit: a href=javascript:void(0); onclick=document.form.submit(); Submit /a This will not work because you are calling the submit method for the form, not any validation script... Also, is there any reason you are

[jQuery] Re: submit a form with a link

2008-12-22 Thread SLR
I have a form with 3 inputs: form id=form1 method=post     input type=text id=input1     input type=text id=input2     input type=text id=input3     input type=submit value=Submit button name=Submit     a id=submit href=#Submit link/a /form First off, why do you have an submit

[jQuery] Re: Giving a text link a hover state when hovering over an image

2008-12-22 Thread SLR
Is this what you are trying to do? $(document).ready(function(){ // This is the border code $(img, li.img-corner).hover( function(){ $(this).next(li.event).css({borderBottom: 1px solid #00}); }, function(){

[jQuery] Re: Div control

2008-12-14 Thread SLR
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

[jQuery] Re: Problems selecting elements...

2008-12-13 Thread SLR
I ended up fixing the issue myself. For those that want to know, it was type-casting issue. I change the following line: var pageIndex = $(body).attr(id);// Pulls ID value from body tag pageIndex = pageIndex.substring(4); to var pageIndex = $(body).attr(id);// Pulls ID value

[jQuery] Problems selecting elements...

2008-12-12 Thread SLR
I've been beating my head over this code for quite some time. I was hoping somewhere here can send me on the right direction... Here is my jQuery Code: $(document).ready(function() { // Dynamically Configures the active link based on ID attribute in body tag var pageIndex =

[jQuery] Re: Problems selecting elements...

2008-12-12 Thread SLR
Alright, I'm really confused now. On my index page, the body tag has an ID with a value of Link0. On this page it works fine; only the first link in the navigation section is changed. Now on all the other pages where the body tag ID is another number (i.e. Link1, Link2, etc), everything just

[jQuery] $this and Hover Method...

2008-12-08 Thread SLR
I'm pretty new to jQuery and I get pretty lost when using the $this variable. I've seen people use it in so many different ways-- ($this, $ (this), $.this, $.(this), etc-- to where I don't know which way is the correct way to use it. Anyways, can somebody look at the following code and tell me

[jQuery] Re: $this and Hover Method...

2008-12-08 Thread SLR
Here's a rundown on 'this'... this - is a JavaScript keyword. Inside a function that is called as a method of some object, this is a reference to the object in question. But whoever calls a function can explicitly set this to be any object. In the hover event handlers (and all jQuery event

[jQuery] Simulate Link being clicked...

2008-12-07 Thread SLR
First off, I'm not sure this is even possible, but I thought I'd ask... Is it possible to use jQuery (or just plain JavaScript) to simulate a link click? Can something like this be done? // Script function doSomething() { // executes some code } $(document).ready(function() {

[jQuery] Dynamic Stylesheets

2008-12-07 Thread SLR
How do you dynamically add or remove stylesheets to a page? I've seen a lot of examples on how to add css styles or classes to an elment, but I haven't found anything on adding/removing entire stylesheets...

[jQuery] Re: Simulate Link being clicked...

2008-12-07 Thread SLR
Just bind doSomething() to the click event for the second link. Can you expand on this? I apologize, I'm somewhat new to jQuery. This looks like a usability nightmare, but whatever ... Looking at my example, I can see why you say this. Let me try to explain what I'm trying to do. I have a

[jQuery] Re: Simulate Link being clicked...

2008-12-07 Thread SLR
No need for scripting: #thumbnails li a { display: block; height: 200px; } I think you are missing what I'm trying to do... $(#MyLink).click(function(){ $(#Link1).click(); return false; }); You'll need to add the id to the first link. Yeah, thats essentially what I want to do. Now how

[jQuery] Re: Simulate Link being clicked...

2008-12-07 Thread SLR
No offense meant, but I think you've misunderstood the CSS I posted. As I understand it, you want the entire LI to be clickable. The CSS rule I posted will do just that by causing the A to fill the LI. If the width is also an issue, then set that, as well. There's no need for the JQuery

[jQuery] How beneficial is chaining methods?

2008-12-03 Thread SLR
I'm new to jQuery and I'm trying to learn some more about jQuery's chaining feature. Chaining methods seems to be one of jQuery's best features (at least this is how I see it described all over over the web). From a developer standpoint, I can see it saving time as there is less code to write;

[jQuery] Re: How beneficial is chaining methods?

2008-12-03 Thread SLR
One advantage to doing this $(#Results).html(Some Text).show(); over this $(#Results).html(Some Text); $(#Results).show(); would be that the script doesn't have to retrieve that wrapped set a second time That's a good point. In this case, chaining would reduce overhead.

[jQuery] Re: How beneficial is chaining methods?

2008-12-03 Thread SLR
On Dec 3, 12:59 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote: That is half correct. Obj.method1().method2().method3() method1 return the modified original object, not a brand-new object. You could do this: var obj = $('#elementid'); obj.method1(); obj.method2(); obj.method3(); And it

[jQuery] Re: setTimeout function call...

2008-12-03 Thread SLR
When I run into this, I put my functions outside the doc.ready.block, but call them from within it. Then they can share vars. Without any code, it's pretty hard to help troubleshoot issues... But if I had to take a wild guess, I'd say it was a scoping issue. The setTimeOut function excutes

[jQuery] Re: How beneficial is chaining methods?

2008-12-03 Thread SLR
Even more than that, if you were to return $(this) you wouldn't be chaining on the original object.     // Return the same object that this function was     // called as a method of (i.e. the jQuery object).     return this;     // Return a *new* jQuery object that contains the     //

[jQuery] jQuery loop help

2008-11-30 Thread SLR
First off, I apologize if this is too noobie a question or has been answered somewhere else (I can't find it anywhere). I'm new to jQuery, and I'm trying to learn some basics. Anyways, I'm stumped on the following. How can I convert this to jQuery? var links = ...

[jQuery] Re: [Beginner alert] How do I output the selected part of the DOM in a web page in a JS alert()?

2008-11-30 Thread SLR
The ultimate goal would be to filter the selection so that only text enclosed in given classes (say loremipsum and third in my example) are returned. First off, I'm also new to jQuery so I apologize if my solution is the best way to do this. Anyways, here's what I came up with html head

[jQuery] Re: jQuery loop help

2008-11-30 Thread SLR
No question is too noobie. Welcome aboard! :-) I appreciate the warm welcome = ) That code won't work at all. I would suggest reading the doc page on .each(): Definitely on my to-do list... If you just want the loop index, it's passed to the .each() callback as the first parameter:    

[jQuery] Re: jQuery loop help

2008-11-30 Thread SLR
First off, I want to thank everyone for such quick replies. That will work, but it's a fairly brittle way to do things. If you add another link earlier in your page, it will change the loop indexes and you'll have to revise your code to match. I understand and agree with you. I don't think

[jQuery] Re: Links within links, and overriding clicks.

2008-11-30 Thread SLR
On Nov 30, 5:33 pm, René [EMAIL PROTECTED] wrote: Just wondering... When you have a link within a link: No idea why you would do this... a id=main href=#This is some long row of test and here is a input type=button id=clickme value=button / and some more text/a ...how do you override