[jQuery] Embed youtube using jmedia
I have been trying desperately to use jMedia to embed youtube videos onto my site, but everytime it doesn't replace the code. But if I put in a normal video, it works fine. Does anyone now how to accomplish this? JAVASCRIPT -------------------- <script type="text/javascript"> $(document).ready(function(){ $("#flash_test").jmedia( {version:"7"}, {src:"http://www.youtube.com/v/hbr6wMiL83Y", width:425, height:350 }); }); </script> HTML --------- <div id="flash_test">Flash
[jQuery] Looping through child nodes
I'm pretty new to jQuery, and I'm having a lot of fun with it. I tried a quick search and didn't find anything really helpful, so maybe this is a good question, or maybe I'm having a brain-fart... What I am trying to do, is loop through a list of child nodes, and only display one at a time. It is easy enough to go through the node list and change classes on a timeout, but I can't figure out how to skip from the last child, back to the first without using as much code as it would take without jQuery.
[jQuery] [validation] wracking my brains on how to get error messages inline
Hi, This is my first post to this forum, and I could really appreciate a bit of help. Maybe not a JQuery validation issue per se, or maybe it is, but... I'm having a terrible time trying to get the validation error messages to display inline, and to the right of its respective form object. I've tried all sorts of code, but messages insist -- persist! -- to always sit on a new line. Here's an example of the form code: <label for="ShipAddress"><?php echo ENTRY_STREET_ADDRESS; ?></label> <input name="ShipAddress"
[jQuery] calling a php function with jquery
Hello ! I have a php function : helloUser in the file : myFunctions.php. This is my function : ... function helloUser($user) { return "Welcome $user !"; } ... I'm using jquery for an application but i don't know how to call a php function and give parameter (here :$user) and recover the result (here : "welcome ..."). Can somebody help me? Thanks a lot. -- View this message in context: http://www.nabble.com/calling-a-php-function-with-jquery-tp15853808s27240p15853808.html Sent from the jQuery General
[jQuery] cluetip question
I'd like to set a default style for cluetips in my project. Since I'm abstracting cluetip for my fellow programmers by wrapping it in PHP, I don't like to add "cluetipClass: 'jtip'" to every call. Can I do something like: $.cluetip.setup({ cluetipClass: 'jtip' }); $("a.cluetip").cluetip(); $("a.cluetip2").cluetip({ some:other_option }); I tried, but it doesn't work like this now. A global style would be a major improvement I think, you shouldn't have to set the style for every cluetip.
[jQuery] [validate] with balloons, how too?
Hello all, I can't do a validate within balloons. I really have the balloons created with div tags. Take a look http://blog.alexsandro.com.br/aa.htm This sample is a simple balloons fired on focus events. Now using bassistance validation(http://bassistance.de/jquery-plugins/ jquery-plugin-validation/) I wish make this works! I alredy try using this: $("#fteste").validate({ rules:{ T1:{ required: true }, S1:{ required:
[jQuery] all parent().children() except the one under a hover
I looked around for this but couldn't find an answer. I have a set of kids and I'd like to have a hover() defined where the hover element doesn't change but all the siblings--$(this).parent().children()--have an effect applied; in this case opacity animation. So this is what I'm playing with but I don't know the idiom to filter out the "this" and just leave it alone. grep()? I know there must be a simple idiom for this. If I write it myself I'm going to wind up with a big stupid function. Any ideas
[jQuery] :visible selector
Hi there! At first: congrats for this really great library! But now I have a problem... I have the following situation: <div style="display:none;"> <span class="test">test1</span> </div> <span class="test">test2</span> When I now use $("span.test:visible") I'll get both span elements although only the second one is visible... Is that a bug or a feature? It seems that the hierarchy is not checked... Regards, Stefan
[jQuery] Plugin clash? accordion and treeview
Hi jQuery folks, I am using both the Accordion and Treeview plugins developed by Jörn Zaefferer in a web application. I am having trouble when I place a div (or definition list, dl) containing an instance of Treeview inside an Accordion div. The Accordion works fine, however the Treeview 'tree' gets misaligned (the list items no longer align vertically and are all indented right, each parent li is further right than the previous li). When I comment out the CSS stylesheet includes for the Accordion
[jQuery] Issues with Truncate and Expander
I just started playing with these two plugins, but have encountered odd issues in both, and was wondering if anyone could help me. I searched around a bit and was unable to find anything. The issue in truncate is that it is breaking the first word after the first so many characters in the opening paragraph, then inserting the <p> after them, rather than leaving it before them. The issue in expander is that is shows up properly at first, but then when you expand it, it closes the <p> at
[jQuery] Dell.com is using jQuery 1.2.2
Just a quick note to say that I noticed today that <a href="http://Dell.com">Dell.com</a> is using jQuery v. 1.2.2 Go to <a href="http://dell.com">dell.com</a> and look at the source for yourself if you want. It looks like they're using some version of thickbox or something too. Click on "My Account" and a modal-type window comes up for a login. Pretty damn sweet if you ask me. Has anyone raised a pint to jQuery recently? The jquery dev teams and this community ought to be damn proud of the work
[jQuery] Execute JavaScript that is added to the page by AJAX?
Basically, I have a JavaScript function (let's call the function "displayDiv") that ends up writing a <div> to the page. If "displayDiv" is called within a table cell, the <div> will be added and displayed in that table cell. Now, what I'm trying to accomplish is replicating this behaviour with an AJAX function (let's call the function "callAJAX") that returns HTML containing "displayDiv" and adding the code to a specific location in the page. I have tried this, problem is that the JavaScript returned
[jQuery] Can I use jQuery to superimpose one image over part of another?
Hi, Let's say I have this HTML <div id="imageDisplay" align="center"> <img id="backside" name="backside" alt="" width="200" src="image1.gif" /> <img id="frontside" name="frontside" alt="" width="200" src="image2.gif" /> </div> and then I have another image, "image3.gif". I would like to layer image3.gif 100 pixels from the left most coordinate of "image1.gif" so that it appears on top of the other two images. The parent DIV, "imageDisplay", is relatively positioned. Is there a way, using jQuery,
[jQuery] Multiple Selector Iterator short-cut
Is there a way to reduce this $("#id1, #id2, #id3, #id4, #id5, #id6, #id7, #id8, #id9, #id10").click(function() { ... }); to something like this $("#id[1-10]).click(function() { ... }); ?
[jQuery] corrections
Apologies. I am trying to seat the error message to the right, not the left, of each form object. L
[jQuery] Fade font color
I am trying to find a way to fade the fore color of the font. I know I can fade the background color of an element, but I would like to fade the color of the font itself. Has anyone been able to do this? Any plugins around that do this?
[jQuery] css({width: varwidth, height: varheight}) and dimensions causing document.resize event?
odd... when setting css based on variables like shown in subject line, IE and FF keep firing a document.resize event. if I use only 1 single attribute inside the {} its fine, but it seems to have issues with multiple, comma-separated attributes. anyone else seen this?
[jQuery] .load jQuery scope problem
i've posted various takes on this problem before, but after re- encountering it today, i must enquire again. so i'm in a function function hey() { var dc = $("div.column"); // at this point, the variable "dc" has all these different objects that seem to represent all the available plugins $("div.widget").each(function(i) { var dc = $("div.column"); // at this point, i get the same exact thing for "dc" when i look in the debugger someCode(); $(this).clone().load("anyURL.htm",function()
[jQuery] Moving select box options up and down
I wonder if anyone has some sample code or plugin for moving select box options up and down using jQuery. Similar to this: http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256C5F00602363 Thanks!
[jQuery] quicktime player and thickbox issue
I have a thickbox modal window, in which I have embedded a wav file. The wav file is being played through the quicktime player plugin. The audio plays fine, but when I open a newly created modal window, more often then not, the player doesn't actually show. Instead I see the gray overlay that is behind the modal window. I ran across a script that redraws an element in the window, which supposedly causes the qt player to be redrawn. However, this method doesn't seem to work for me. Has anyone come
[jQuery] bizarre width inconsistency between FF and IE using dimensions plugin
hello... I'm using the dimensions plugin. I'm using UL, LI to generate a scrolling grid. #datatableHead ul has my column headers #datatable is a div that's scrollable first I set widths for the head and scroller: $('#datatableHead ul, #datatable').css({width: $(window).width()-20}); then I set my grid rows' width based on the scroller's width - since its all based on viewport size. $('#datatable ul').css({width: $('#datatable').width()}); looks perfect in IE - but in FF the width of the #datatable
[jQuery] Close facebox programatically
Hey folks, I'm trying out jQuery for the first time on my little project and I am very excited about all the cool stuff. I'm trying to use the Facebox plugin as a dialog. It works great so far, but I need a way to close the dialog programatically instead of having the user click on the 'Close' button provided by the dialog window. The docs for Facebox indicate that I should be able to do this with the following statement: jQuery(document).trigger('close.facebox') But nothing happens when I execute
[jQuery] append problem in ie7
hi guys, Im new to jquery. I have this problem and I think you guys can answer it. Here's the source code of the file that I am working on. The purpose of this script is to change the label into different language. ------------------------------------------------- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>title</title>
[jQuery] Plugin Authoring Help pt 2
Ok, I'm really trying to wrap my head around this, and it's irritating me. I've checked out the following pages: http://docs.jquery.com/Plugins/Authoring http://www.learningjquery.com/2007/10/a-plugin-development-pattern And they help some but there's one problem I'm running into. I have: $.fn.myPlugin = function(options) { $.myPlugin.defaults = $.extend($.myPlugin.defaults, options); return(this); }; $.myPlugin = { defaults: { def1: 'default1', def2: 'default2', ... defx: 'defaultx' }, myFunc: function()
[jQuery] Evaluation ajax response data
Hi, I have a simple ajax app that returns a dataType of "text" with a string of either "yes" or "no". The script works fine, but for some reason, when I try to use an if/ else statement to evealutae the response, it always return false. in the following example, my code will alert "yes" but the if statement acts as if the data variable is not equal to it, even when it is For example: var d = page.php?params; $.ajax({ type: "GET", url: "/ajax/processEmail.php", data: d, dataType: "text", success:
[jQuery] help with a strategy?
Hi all, the application I'm attempting to write couldn't be simpler: I want to display rows of data, retrieved from a database and allow people to edit or delete those rows and add new rows. Backend is PHP, but I'd prefer to keep that out of the picture. So far I'm passing my rows successfully to jquery and have the loop ready to go, but I'm not sure how to proceed. Here's my dilemma: what's the best strategy for keeping the HTML out of my Javascript as much as possible? The whole point of this excercise
[jQuery] .html() callback?
Hi everyone, Like a lot of methods of jQuery, why the .html() doesnt have a callback? I need that some javascript load when the dom change with .html() (append and others too), and some events are attached with the new elements created by this method. What happens is that sometimes they are attached and other times not. I thing its due the fact that I execute this code: $('#div').html(stuffVar); $.getScript('newEvents.js'); This work sometimes. I would need one way to accomplish this task like this:
[jQuery] Problem Targetting DIVs (Dynamic List Example)
Hi, can anyone tell me why this isn't displaying the default list automatically when the page loads? If you look in the code where the comments are, I think one of those places is where the problem is. I can't work it out however as I am fairly new to jQuery. <html> <head> <title>Quick Links Tester</title> <style type="text/css">.hide {display : none }</style> <script type="text/javascript" src="jquery-1.2.3.min.js"></ script> <script type="text/javascript"> $(function() { $("#QuickLinksSelect").show();
[jQuery] validate form with rails
Hi All, I'm using jQuery plugin Validation by Jörn. The problem is that in rails the element name for an input is formated as "user[email]" so when I pass a rule, it doesn't recognize. here is the sample: rules: { user[email]: { required: true, email: true } } it gives me a error on firebug: "missing : after property id user[email]: {\n" If there is a way to pass rules with the element id instead of name, would solve the problem. I think... Thanks, Rodrigo Soares
[jQuery] passing form data to $.ajax
hi :) I'm wondering is there a way to pass form data to $.ajax()? let's say I want to upload a file, what is the correct way? passing the content of the input type="file" this way $('#myInput').val() doesn't work. How is that done? thank you andrea
[jQuery] changing the selected option in a select
I can't seem to get this to work... I'm using jquery 1.1.4 I have a link 'a.clear' When clicking on a.clear, I want to reset all selects to a 'null' option: javascript:void(0); clear <select> <option value="0">--</option> <option value="1" selected="selected">this</option> <option value="2" >that</option> </select> this didn't work (as well as several other variations): $('a.cancel').click( function(){ $('select option[value=0]').attr("selected","selected"); }); can someone clue me in? Thanks! --
[jQuery] Event Bubbling - Not!
I am a little confused about event bubbling. Say for example I have the following bit of HTML: <code> <div id="main"> <div id="one"> one </div> <div id="two"> two </div> </div> </code> when I try: <code> $("#main").mouseout(function() { alert('test'); }); </code> The alert gets fired even when mousing in/out of divs one/two, but while still staying within the main div. How do I fire the alert only if I mouseout of everything (including main), not just out of one
[jQuery] absolute position inside inline element (opera)
So iam working on a new version of my plugin jquery-roundcorners- canvas (http://meerbox.nl/?page_id=4) and i want to support rounding inline elements. Everything works fine in ie7 and firefox but not in opera. Opera just doesnt absolute position a element inside a inline element. I have no idea why. Maby a bug in opera? I have made a page which shows what the problem is: http://meerbox.nl/opera.html Any help would be appreciated :)
[jQuery] .load errors in IE6 & 7
Ok this is driving me crazy. When executing .load I'm getting a "XMLHttpRequest is Undefined" in IE 6 and in IE7 the error is "Permission Denied". It creates a blank page with this in the source: <script id=__ie_init defer=true src=//:></script> Right before the .load it is successfully executing an ajax call that updates my database. Any ideas?
[jQuery] $.ajax success/error callback arguments, textStatus?
reference: http://docs.jquery.com/Ajax/jQuery.ajax#options What exactly is textStatus of the success and error callback argument? Being a coldfuision user, I tried: <cfheader statuscode="403" statusText="testing123"> However, the textStatus is always the default value. Any idea how to set textStatus on the server side? Thank you!
[jQuery] How to serialize only part of a form?
Hi, If I have a table row <tr id="row1"> <td><input type="text" name="text1" id="text1" value=""></td> <td><input type="text" name="text2" id="text2" value=""></td> <td><input type="text" name="text3" id="text3" value=""></td> </tr> how would I serialize the name value pairs in the row with id "row1"? I would like my the result string to have "text1=someval&text2=somenewval&text3=someotherval". Note there are many other rows with input fields in my table and each row has a unique id. Thanks for your
[jQuery] Can I use jQuery to make stickies/post-it notes ?
I know there's a way, but does anyone would know of any tutorials describing how to make 'stickies' on a web page? I would appreciate a nudge in the right direction. Ultimately, what I want to make is a way for people to post notes on a virtual calendar that they can drag around to any position on the calendar, just like a real post-it note. The position and contents of each post-it will be stored in a database. It might be a pain in the a** to implement but that's what the client wants! Thanks.
[jQuery] Plugin Help
I apologize if this seems noobish. So let's say I want to write my own plugin (who woudln't?) So I spec it out like this: (function($) { $.fn.myAwesomePlugin = function(options) { var defaults = { [some defaultish stuff here] }; var options = $.extend(defaults,options); function rockOn() { // I want to call another function in myAwesomePlugin here }; })(jQuery); How do I call the other function in rockOn? Say it's called startRockin. Do I do $.myAwesomePlugin.startRockin? Do I simply do startRockin?
[jQuery] Can't get started on Getting Started :)
Disclaimer: Complete jQuery/JavaScript noob here, but heavily experienced developer overall. (And I have been googling around finding similar questions, but nothing from those exchanges can get this basic hello-world example working.) Platform: FireFox 2.0.0.12 on Windows XP Here is what I had after the first suggested enhancement, namely adding an alert on a click: <pre> <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/ javascript"> $(document).ready(function()
[jQuery] [ANNOUNCE] Release of jMaps 2.1 RC1
Hi folks, Today I am releasing the first release candidate of jMaps 2.1 jMaps is a jQuery plugin that provide several useful functions that make working with Google maps easier. I had been neglecting it recently, however after several request for documenation I finally got my finger out and fixed a few bugs and added some missing features. The latest version is available on my mercurial repository, you can grab from http://hg.digitalspaghetti.me.uk/jmaps/ hg clone http://hg.digitalspaghetti.me.uk/jmaps/
Next Page