jQuery should make Builders for both developers and regular web page designers
I hope I am posting this to the correct jQuery forum. I have long been an advocate of making Builders, for users of web tools (so totally uneducated and untrained people can ad dynamic content to web pages). I am also an advocate of Builders for JS developers as well -- because it is one big way to simplify making dynamic stuff for web pages. Examples of several of my Builders can be seen at http://mynichecomputing.org . It is my hope that more people (jQuery people) will build Builders.
.data() corrupts jquery chaining?
Hi Folks, the following code works fine, but the span is NOT a child of the Li element. Instead it is a child of UL. If I remove the .data() from the chain, that SPAN is created as a child node, like it should be. $(".mainmenu-filter-content ul") .append($("<li id='flt_" + data.id + "'></li>") .data("filterdata", data)) .append($("<span class='small'>Foo!</span>")); Do I miss anything here?
howto find a child and count it.
Hi People, I got a kind of a problem. I want to count the childs and than do it with * 20px so the menu know howto slide So for example, the first menu has: ul li.top ul and in the ul is just one li. than the margin top must be $(this).stop().animate({ marginTop: '-=20px'}, 350 ); but if you look at the second menu the ul counts 6 times the li. So it must be 6*20 px $(this).stop().animate({ marginTop: '-=120px'}, 350 ); This is my code $(document).ready(function() { $("li.top").hover(function()
Hosting of JQuery on Google and its availability in China
I was happy to find that JQuery is hosted on Google servers, and I deployed it immediately on my website. It has been working fine for me. It speed up page loads for two reasons: Google's hosting is faster and probably has a CDN. Secondly, browsers can cache it across other websites. But I don't know whether using this has any repercussions on Chinese visitors (behind the great firewall of China)? Thoughts anyone?
custom attributes
Hi there, This may have been answered before, but I couln't find a solution yet. I need to know what the best practice is to be able to assign custom attributes to elements. for instance; let's say we want to have a tooltip on certain elements... What I would do is something like this: <div class="tooltip" tooltip_title="Title goes here" tooltip_text="Content of tooltip"/> Then I would have jQuery select all elements with a tooltip class, and instantiate these elements by adding a tooltip to them,
Select a text
Hello, I would like to select a text, in my HTML page. Is that possible? About the page http://api.jquery.com/category/selectors/, it seems to be not allowed by jQuery... For exemple if my document is: <html> Hello word! </html> I would like to select each "l" letter and replace by L (thanks to http://api.jquery.com/replaceWith/ for instance). But I don't know how to select just a text. Thanks for your help.
Issue getting html() from a TD by chaining elements with tags and IDs within $() scope.
Hello, I've been programming in jQuery for some time now, and for the first time, I came across an issue where I am writing out the location of a TD with an ID="step" to get the innerHTML with html(). I receive a null value, but when I use td:first within the chain of elements, it works. Has anyone experienced this issue or have any idea why this is not working? I've tried other TDs with diffirent IDs within the same row, and the same null result happens. Is there a possible limitation to the numbe
Jquery not selecting text from second node
[CODE] $(xml).find("performance_0").each(function() { alert ($(this).find("the_images").eq(0).text()); });[/CODE] Here is the xml. [CODE]<Motion_Design_Images> <performance_0> <the_images> <img>sasha_n_lex_PEX_01.jpg</img> <img>sasha_n_lex_PEX_02.jpg</img> <img>sasha_n_lex_PEX_03.jpg</img> </the_images> <Date>2009/October</Date> <title>PEX Halloween 2009</title> <description>This is a description</description>
jquery inside Ajax Tab
Hi everyone, sorry if this has been posted before I did search and couldn't find the answer I needed. I'm new to jquery and have got it working loading php pages into the tab ui using ajax. The problem I am having is that inside one of those tabs I want to use thickbox to open up a user form, however clicking the link just opens a standard link up not a thickbox link, if the code is outside the tab it works fine, I've tried this in IE and FF. I've even tried adding all the header files to the code
new (1.4) api xml outputs newlines (\n) instead of <p>
i'm using std. ajax call to load the xml api into my app and was wondering why $('longdesc', entry).text(), where entry is a single <entry> inside <entries> turns the "html" inside that node to rubbish ?! btw: why is it that sometmes there's a CDATA tag inside nodes (where <code> starts) but most of the times there's just plain xml ?
How to emulate flash MovieClip functionality?
This post is not directly related to jQuery but is pertinent to js+html5 development. I am trying to move my team of developers entirely away from flash development to js+html5 but there is one piece of flash functionality that I have no idea how to emulate. In Flash you can create MovieClip object that lives entirely in its own namespace and only requires me to embed one swf file. The MovieClip object does not necessarily contain a movie. It could contain an interactive animation, audio player,
first()/last() methods in the API docs website
Hello, I have been trying to discover why the first() and last() methods are not working in my jQuery 1.2 nor 1.3 tests. After searching for a while, I found the alternative way with filter() and eq(), but I still wonder why none of those methods work. The API documentation (http://api.jquery.com/first/ and http://api.jquery.com/last/) states that they are available since 1.2, but they won't work, I always get a "not a function" error. I also found a tracker entry (http://dev.jquery.com/ticket/2164)
can't use variable to access json node
Hi, I'm wondering if someone can clue me in on why I cannot access json data by using a variable as a node name. I'm trying to grab a random quote from a .json file and display it in a div. When I access a node in the object by node name I can access the node data. However, when I try to use a variable in place of the node name (because I want to grab a random node) I get an object undefined error. Any help is appreciated Thanks! JSON object: { "quote1" : {"quote" : "hello, world."}, "quote2" :
Script is not working in div with fixed position in Safari and iCab
This script does not work properly when the div #nav has position fixed. The error occurs only in Safari and iCab and only with #nav position fixed. In Firefox, IE, Opera an in Mac OS Chrome it works fine. Has anyone any idea what the problem is? $("#nav ul li ul").hide(); if ($("#nav ul li ul li").hasClass("aktuell")) { $(".aktuell").closest("ul").show("fast", navKl); } $("#nav ul li h3").click(function() { if ($(this).next().is(":hidden")) { $("#nav ul li ul").slideUp("normal", navKl); } $(this).next().slideToggle("normal",
New line chars
HI all, I have textarea with id, id_cusipvalue I am getting the value using the following function $("#id_cusipvalue").val() when I send this data as GET url?+$("#id_cusipvalue").val() all the new line chars get stripped . How can I retain the newline chars ? Thanks Sumanth
.load() on ad hidden (.hide()) Div with no change
I have text broken into two divs, #bioTop (top area of bio) and #bioBot (lower portion of bio), By default the bottom is hidden and toggles when the user clicks the more button. The site page is oncalllegal. The subject bio is the last one for Fredrico. When the english or spanish text is clicked the top bio changes accordingly. The bottom that is hidden is not changing and I cannot figure out why. I have played with the jquery and just get the same results. Can any one tell me how to have
Selecting a parent tag
Greetings jQuery friends. This question has been puzzling me for quit some time: I have two identical forms on a page, with a submit button named BeginHere ( input[name=BeginHere] ). What I am trying to do is to select the form which has the input button that was clicked on. How should I go about it ? I thank you in advance for your help and hope I made my inquiry clear. Foreplay
live() not appearing to work
Hi -- I have this in my jQuery() function: $( "#admin_new_records ul a" ).live( "tap", function() { jQT.goTo( "#admin_new_records" ); return false; }); I create the links that match this on the fly with jquery.builder.js, and have confirmed that searching the resultant DOM in the console with the string "#admin_new_records ul a" does indeed return the elements I want. The problem is that when I click on the links, the jqt framework still seems to handle the tap, and returns to the first screen
basic jQuery selector question
I'm trying to access an ID nested in a DIV which for the life of me I can't figure out: <div class="verificationTextBox">Verification: <a id="download_now" title="Review more about CAPTCHA" rel="#modal1" > </a> </div> <script type="text/javascript"> $(document).ready(function() { $(".verificationTextBox ~ #download_now").tooltip({ effect: 'slide', offset: [-180, -7] }); });
jQuery 1.4 breaks ASP.NET MVC parameter posting.
Background: Using ASP.NET MVC if you post to an action using the same variable names as those on the method signature it automatically parses them for you. However with jQuery 1.4 if you post an ARRAY it changed how the post variable name is formed, adding [] to the end. This is an impasse since I obviously cannot append [] to my variable name in the controller. At the moment this is a huge problem if we intend to upgrade to v1.4... ever. jQuery 1.3.2 post data: {myarrayvar=something&myarrayvar=somethingelse&anothervar=true}
Simple ajax function providing difficult debug situation in Chrome/Safari
Hi, I have a *very* simple jQuery/ajax script for a membership driven website. The script just checks to see if the user entered info, validates it against my database and returns 1 for a failed login attempt, and 0 if the username/password match. The function works perfectly when I run it w/o calling it from ajax. **Firefox:** everything works. **Chrome/Safari:** The query is locking everything up. When I enter valid info, there isn't even any record of a request going out (in the developer
Run functions after load() (function from the loaded page)
I have a nproblem with running commands from a loaded page; AA.html $("#X").load('BB.html'); BB.html $(document).ready(function () { alert("X"); }); Now i want to execute the alert() on page BB.html when doing the load on page AA.html. How can this be done?
Problem with inserting <link> into <head> in IE with 1.4
So for a site I maintain, InsideCCS, I have the following code for dynamically inserting stylesheets on a page: var newCSS = []; $.each(options.styles, function(index) { newCSS.push('<link href="/styles/'+options.styles[index]['href']+'" media="screen" rel="stylesheet" type="text/css" class="dynamic_css" />'); }); $('head').append(newCSS.join("")); This code can be seen at line 156 in http://insideccs.com/scripts/global.js. This worked perfectly well using jQuery 1.3.2 (and back through to 1.2.6
Some advice on efficiency of DOM injection please
Hi all - thanks in advance for any help you can provide. I've implemented jQuery within a web application where a very large number of DOM elements, comments in this case, are injected post-load by a 'Show all' button. Returned via JSON is a HTML string of <li> elements, to be injected into a pre-existing <ul> element. I'm looking to make this more efficient, as reading various sites I've been led to believe that wrapping new elements in a parent wrapper node before injecting would yield the best
Thumbnail Help required
Found JQuery whilst searching on web for any information on creating a 'Thumbnail' control in ASP.NET I need to create a thumbnail solution in order to display images of products. There can be more than 1 thumbnail per product and I need a way to enlarge the image as well. The thumbnails will be displayed in atleast 3 or 4 pages across the system and I need the ability to delete them as well. For version 2 of the software (knowing PM's it may be thrown into Version 1), I think I will need to be able
remote jquery nested tabs
Hi I have nested tabs in jquery tabs which are pretty simple to do if we want static jquery tabs but what if we want nested tabs that the remote page should decide what would be the tabs. or in other words i want nested tabs in a remote page (or ajaxified) For example i m calling this page(remote page) through tabs <div id="container-2"> <ul> <li><a href="#fragment-1a"><span>Section 1a</span></a></li> <li><a href="#fragment-1b"><span>Section 1b</span></a></li> <li><a href="#fragment-1c"><span>Section
Jquery & Loading bar
Hi! I'm new to this forum... I need some help about making a loading bar using jquery... I want to load a file with php or similar linguage and visualize the progress whith a status bar... Can you help me? I've searched about this... but i didn't find anything useful... Thank you so much in advance!!
"Load" a php-script and include POST-data
Hi there! I'm integrating a small php form into my website using this: jQuery("#myID").click(function () { jQuery("#myScript").load("myscript.php"); jQuery("#myScript").fadeIn("slow"); });Everything works fine until I press the submit button. Of course the whole page is beeing reloaded and the submitted POST data is on my webpage but not INSIDE the php-script (which is integrated via "load"). How can I submit POST-data to my myscript.php file? Every hint is useful!! :-)
Problem with Date and $.ajax
Hi all, First I would like to thank the jQuery team for this new release! It looks extremely promising. Btw, I just updated a test page to jQuery 1.4 and now I am getting the following error: "this.toDateString" is not a function when a Date object is created within the scope of an $.ajax call The error is generated by the following: Date.prototype.shortDayMonth=function(sep){ var str=this.toDateString().split(" "); sep=sep||" "; return str[2] + sep + str[1]; }In that case "this", inside Date.prototype, is
jQuery AJAX query - please help
Hi, I am trying to submit XML values via a form using jQuery. I then need to process the returned XML. I am testing using the following jQuery: $(document).ready(function(){ jQuery('input#process_card').click(function(){ $.post("https://secure2.epdq.co.uk:11500", $("#testform"), function(data){ jQuery('.confirm').hide(); }); }); }); and the following HTML form: <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" id="testform"> <input type="hidden" name="CLRCMRC_XML"
1.4 sometimes treating a string passed to .after() as an expression
Under 1.3.2 the following worked without a hitch: $("#content a[href$='.mp3']").after(" (Right click to download) "); Under 1.4 it throws an exception. I need to either remove the brackets from the string to be added to the page or return the string from a function: e.g. $("#content a[href$='.mp3']").after(" Right click to download "); or $("#content a[href$='.mp3']").after(function () {return " (Right click to download) ";}); My error? Glitch in 1.4? Edge case?
childrens() in I6 does not work corectly.
I got a pice of html that i want to transform to UI Tabs. This code is aouto generated and wrong, so I want to correct it before calling tabs() function <div id="localtabs" class="list"> <ul> <li id="tab1"><a href="#tone" title="Local Tab One"><span>Local Tab One</span></a></li> <li id="tab2"><a href="#ttwo" title="Local Tab Two"><span>Local Tab Two</span></a></li> <div id="tone">some text</div> <div id="ttwo">som other text</div> </ul> </div> My target is to move the divs currently inside the UL
want to insert css value for a selected element?
Hi, I have a function to calculate dynamic height of a div element function getComputedHeight(theElt){ var browserName=navigator.appName; if (browserName=="Microsoft Internet Explorer"){ var is_ie=true; } else { var is_ie=false; } if(is_ie){ tmphght = document.getElementById(theElt).offsetHeight; } else{ docObj = document.getElementById(theElt); var tmphght1 = document.defaultView.getComputedStyle(docObj, "").getPropertyValue("height"); tmphght = tmphght1.split('px'); tmphght = tmphght[0]; } return
looking for menu to scroll menu points with mouseover
Hi, I'm looking for an menu similar to the one one mercedes.com site > http://www3.mercedes-benz.com/mbcom_v4/de/en.html When you click on the combobox in the second box on the left, a menu appears with a certain hight and the possiblity to scroll up and down on mouseover. Does anybody know a plugin to realize this or has an hint how to do it? jCarousel has some kind of textscroller but I need mouseover on an intervall. thx Florian
Please help me moving my Menu UP instead of down
Hi people, I'm working on a menu that's going up. But i can't figure it out how to go make the LI going up. My menu structure look likes this: <ul> <li>menu 1</a> <li><a href="some link">sub1 of menu1</a></li> <li><a href="some link">sub2 of menu1</a></li> </li> <li>menu 2 <li><a href="some link">sub1 of menu2</a></li> <li><a href="some link">sub2 of menu2</a></li> <li><a href="some link">sub3
jQuery trim() function in Opera/Safari
I have a form with a submit button with id 'submit-item'. If a user clicks this button, the fields of this form are read, and sent to a server through an ajax callback. However the code breaks at the point where the trim() function is being used. Here's my code: jQuery('#submit-item').click(function(){ var description = jQuery('#item-info textarea[name=item[description]]').val(); var assignee = jQuery('#item-info select[name=item[responsible]]').val(); var duedate = jQuery('#item-info
1.4 change event problem
Hi all I have posted this on google groups. and i suppose this is where the discussion happens so i post here again. I apologize if this problem has been post or report. I have a problem using jQuery 1.4 when i use $("#mySelect").change(function(){...my logic...}) This problem only occurs in IE. 6-8 all have the same problem and jQuery 1.3.2 does not have this problem. This problem occurs when I bind a "change" event on a select and when the page is loaded the selected option is not the first
passing variables to a page...help!
I know ajax...but having a crazy time making the jquery do the same function.... I'm passing a variable and appending it to the page. How can I re create that function with jquery? Here's my ajax code below: function filterColumn(){ var tl = document.getElementById('tl').value; dim(); loader(); nocache = Math.random(); http.open('get', 'include/filterColumn.php?tl='+tl); http.onreadystatechange = doFilter; http.send(null); } function doFilter() { if(http.readyState == 4){ closeDim(); var response
Using array subscripts to access jQuery object methods
I've noticed I can get properties of jQuery objects using array subscripts, but it doesn't seem to work with methods. That is, I can do jQuery('p')[3].style.color = "red" and turn the third para red, but if I tryjQuery('p')[3].css("color","red") it doesn't work. Any way to make methods work with subscripts or am I confused about something? Another item, as long as I'm here. I couldn't get setTimeout to work with IE until I put the listener in quotes. But I read somewhere this is a security risk.
remote validation
i am working on a form, it submits after the remote validation input. it doesn't complete the whole validation. any ideas what i am doing wrong, i am very new to jquery!
Next Page