Does jQuery provide a way to append an element immediately before the
closing tag of another element? For instance, say I have the following
paragraph element:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean
adipiscing gravida leo. In hac habitasse platea dictumst. Phasellus
aucto
Hi Matt,
Give this a shot:
$(document).ready( function(){
$( '#menu ul' ).hide();
$( '#menu li.' + $( 'body' ).attr( 'id' ) + ' ul' ).show();
});
Demo here: http://jsbin.com/ehape
Chuck Harmston
http://chuckharmston.com
On Sat, Apr 18, 2009 at 10:50 AM, Max wrote:
>
> hi Im
SelectFileNameDate
Company:
Division:
i can reference the fist select 'licenseeID' and populate it.
but the third 'divisionID' can not be referenced,which says 0.options.
var licenseeid=$('#licenseeSelectID').val();
$('#divisionSelectID')[0].options.length=0;
Well, let me clarify it. The two code snippets are inside two separate
$(function() {}) (called on page ready). As I verified the first one
is called first, and the the second (unbind) one.
Is this the case you tested?
On Apr 18, 3:42 pm, victorg wrote:
> I tried your code, but for me it works
loop over the query in your CFC method. create an array of structs,
and do your replace() function there. then return the array of
structs in place of the query (a query is really nothing more than an
array of structs anyway).
you don't HAVE to return a query, right?
On Sat, Apr 18, 2009 at 6:
Thanks Jorn, appreciate the quick helpful response.
On Apr 18, 4:13 pm, Jörn Zaefferer
wrote:
> The plugin references only "jQuery" as a global variable, $ is defined
> as a local variable. See
> alsohttp://docs.jquery.com/Plugins/Authoring#Custom_Alias_in_plugin_code
>
> Jörn
>
> On Sat, Apr 1
The error given when you try it says it all: "type property can't be
changed". It doesn't make any sense to change the type attribute of an
input. If you need different data, you should create a new, different
input, which is exactly what you are doing with the code you posted :)
On Apr 18, 4:49
Yes thanks!
On Apr 19, 11:10 am, Rick Faircloth wrote:
> Check this out, iceangel...
>
> http://flesler.blogspot.com/2007/10/jqueryscrollto.html
>
> May be just what you need.
>
> hth,
>
> Rick
>
> On Sat, Apr 18, 2009 at 11:05 PM, iceangel89 wrote:
>
> > how can i slide down to part of a page
jQuery uses CSS3 syntax. To select a select element you use it's
tagname, "select", just like you would "div":
var yearfrom = $('select[name=yearFrom]')
You get the "yearfrom.options undefined" error because what you get
from the jQuery $() function is a jQuery object, not the DOM element
like r
Not sure exactly what is causing the problem, but you should upgrade
your version of jQuery to 1.3.2 and remove the reference to demo.js,
since that one isn't needed. I pulled down your page and made those
two changes, and it seemed to work fine from here.
--Karl
Karl Swedberg
Check this out, iceangel...
http://flesler.blogspot.com/2007/10/jqueryscrollto.html
May be just what you need.
hth,
Rick
On Sat, Apr 18, 2009 at 11:05 PM, iceangel89 wrote:
>
> how can i slide down to part of a page (say an or div#with-id
> tag)? u know those horizontal or vertical sites?
>
how can i slide down to part of a page (say an or div#with-id
tag)? u know those horizontal or vertical sites?
Yes, absolutely. You can add your own function to any of the $.ajax
callback functions in the ajaxSettings option now. Your function will
be queued first for beforeSend, complete, and success, after which the
plugin's code will run. For error, however, yours will completely
override the def
Thanks for getting back to me,
You are correct I had to modify the script hence it was a temporary
fix, but now that I can use my own beforeSend() that makes it handy.
Does this mean the error callback can also be defined to the
ajaxSettings option?
The reason I ask is because sometimes you woul
That's one of the thing's I said below that I couldn't see how to do.
The cfc method runs a query and retrieves all the data involved,
then the query data is stored in storyStruct.QGETSTORYINFO
and returned to the calling AJAX function.
At what point could I run a regex on the specific piece of d
why not run the replace in the CF function that's returning the data?
On Sat, Apr 18, 2009 at 6:12 PM, Rick Faircloth
wrote:
> Normally, when I'm trying to cause a passage of text to respond to line
> breaks, I use this ColdFusion code:
>
> #replace(myText, '#chr(13)#', '', 'all')#
>
> and that
Normally, when I'm trying to cause a passage of text to respond to line
breaks, I use this ColdFusion code:
#replace(myText, '#chr(13)#', '', 'all')#
and that keeps the line breaks intact when the text is output to the screen.
But how can I write that code inside this js? Or do I have to do it
Is there any particular reason you need JavaScript to do this, instead
of just using CSS?
#menu ul {
display:none;
}
body#foo ul.foo, body#bar ul.bar, body#foobar ul.foobar {
display:block;
}
On Apr 18, 10:05 am, Max wrote:
> Thanks so much for the reply.
> however i may have
I usually create a transparent overlay over the page to prevent
additional actions. Usually a div with position:fixed does the job.
var showOverlay = function()
{
var overlay = $('');
overlay.addClass('overlay');
overlay.css({
position: 'fixed',
top: 0,
bottom:
Something else must be wrong there, because there has never been a
problem with jQuery being able to identify select elements. They are
identified by tagName, just like any other element --$('select') -- so
there is no need for a :select pseudo class. And of course you should
be able to use
Hi Victor and thanks for your reply.
I have wrapped up your code within a $(document).ready(function(){
but when I go over the button I get
$(el).scrollTop is not a function
[Break on this error]$(el).scrollTop(jQuery(el).scrollTop() + inc);
I'm using jQuery 1.2.3.
Am I missing something?
T
The plugin references only "jQuery" as a global variable, $ is defined
as a local variable. See also
http://docs.jquery.com/Plugins/Authoring#Custom_Alias_in_plugin_code
Jörn
On Sat, Apr 18, 2009 at 11:30 PM, steve wrote:
>
> Didn't know if there was an easy way to do a replace-all, to
> accomp
Goodmorning
I installed wordpress on my website and now my cleutip stops working.
HLP!
Did I do anything wrong? I installed Lightbox 2 and All in One SEO Pack in
wordpress. Deactivated them but stil no cleutip.
My site is on www.moof.be It worked perfect before wordpress
Really need help
Didn't know if there was an easy way to do a replace-all, to
accomplish this.
Basically, I wanted to use tooltip for my Wordpress blog, however the
requirement for using jQuery in that environment is to -not- use $
("elem"), but insteadjQuery("elem").
Can I do a global replace in jquery.t
Doh! I knew it was something obvious!
Thanks!
Re: Speed of join vs .append
Back several months ago when I first started working with constructing
tables, etc., based on ajax data and inserting the elements into the DOM,
I was using .append, but it was extremely slow.
Someone suggested the out
Hi, I'm trying to find out how to temporarily ignore user input while
a search is in progress. The following is the desired behavior.
(1) User enters some information (e.g. name and age).
(2) User clicks on the search button.
(3) $.post() to execute a search in the background.
(4) Show a "search
" .each"
Where's the "$" or "jQuery" so it's "$.each" or "jQuery.each"
And why hog up memory with an array just to join the array? .append
makes a whole lot more sense there
On Apr 18, 2:42 pm, Rick Faircloth wrote:
> I know this is out of context, but assuming everything is correct...is
> a
Even if I add an id to the select element and try to select by Id, I
cannot get a reference to it:
yearfrom = $("#yearFrom")
gives me the error "yearFrom.options is undefined" when I try to get
to the yearfrom.options[0] array...
Luckily document.getElementById("yearFrom") still works so I g
Haven't gotten too deep when checking it.. but I advice you to use
serialScroll for the prev/next part. It integrates perfectly with
localScroll and both would share one single scrollTo so it's just a
few more bytes.
Cheers
--
Ariel Flesler
On Apr 17, 5:06 pm, Dan Pouliot wrote:
> I have a web
$("select[name=yearFrom]")
doesn't work
$(":select[name=yearFrom]");
doesn't work
$(":input [name=yearFrom]")
doesn't work
$("input[name=yearFrom]");
doesn't work
There is no :select element in the jQuery docs, only an :input
element. There should be a way to select select elements...
On Apr 18,
Hi,
Thanks for all of you help before. It must not have been a syntax
error, but an ordering one. I took it out of the js file and put it
directly in the page I needed, and it worked.
Thanks again,
Connor
On Apr 18, 1:53 pm, Connor wrote:
> Hi,
>
> I'm sorry. It was rude of me to assume you g
Thanks Richard, that is just what I needed.
Cheers.
On Apr 17, 11:20 am, "Richard D. Worth" wrote:
> This is going to require canvas. So a google search for 'rotate image
> javascript canvas' turned up:
>
> http://snippets.dzone.com/posts/show/5514
>
> http://code.google.com/p/jquery-rotate/
>
Ricardo,
Thank you for that link. Very interesting stuff there. How is SVG
support these days?
On Apr 18, 1:13 am, Ricardo wrote:
> It is doable with SVG/VML too:
>
> http://raphaeljs.com/image-rotation.html
>
> cheers,
> - ricardo
>
> On 17 abr, 12:20, "Richard D. Worth" wrote:
>
> > This
Hi,
I'm sorry. It was rude of me to assume you guys had nothing better to
do than to sort through my own code. I apologize. I had tried to
comment out every section of code to isolate the problem, but that
hadn't worked for me before. However, I realized the only section I
had not commented out w
No, it's not working. I was trying both ways.
My code is wait.php:
Untitled
id = " . $id . "";
echo "number = " . $number . "";
?>
index.html:
Untitled
http://code.jquery.com/jquery-
latest.js">
http://malsup.com/jquery/block/
jquery.blockUI.js?v2.17">