problem with strings with into jquery
I need help to manipulate strings, but for example when I am programming an event with jquery and extract data from a textfield for example I can,t do this var msg=msg.subtring(0,5); or for example this does not work-> //------------------------- $("#btn_send").click(function(){ var ide=$('#txt_ide').attr('value'); var name=$('#txt_name').attr('value'); var age=$('#txt_age').attr('value'); if(age==null) alert("Type age"); });
jQuery dropline menu
Hi guys, I am using this menu on one of our websites - http://www.dynamicdrive.com/style/cs..._line_tabs/P0/ I would to implement the following tips to the menu but am not sure how to.. 1) Implement a .stop() to prevent animation queue buildup. See Brandon Aaron's solution: http://www.learningjquery.com/2009/0...-queue-buildup 2) Set a timeout for the menus to stay open for ~1s or so. As it stands, mousing 1 pixel off the bottom will close all layers of the menu, and can be quite frustrating to
how does $(e.target).parents work?
I've got a fixed-position div (.panel) that I am hiding/showing based on a click event of a trigger (.trigger). When the (.panel) div is visible, I want the contents of the div to be clickable and the trigger (.trigger) to toggle the visibility. No problem there... works great. As an added usability feature, I want to close the (.panel) div if the user clicks either the trigger (.trigger) or anywhere outside of the (.panel) div itself (any where else on the page). This is the code that I am implementing:
.click(); working in ie but not firefox
Hi, I'm a little new to this, so it may be a stupid question, but here goes... I had a developer make a modifacation to a page where a button is automatically clicked when a customer hits the page. He did this, and it works fine in ie, but not in firefox, and I wont be able to get hold of him until next week, so was hoping someone on here may have some suggestions?? The code he used is... <script type="text/javascript" src="Scripts\jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function()
HTML Problem
I have two select boxes. The second one is getting the content with ajax call, acording to the value selected at the first one. My problem is only in IE. When the second select box geting longer text and the html table TD is not enlarging itself too. FireFox works fine with this code. $(document).ready(function() { $("#category_id").change(function(){ var CategoryId; CategoryId = $("#category_id").val(); var selType = $('select#type_id'); $.getJSON('RetrieveProductTypes.action', {'categoryId': CategoryId},
Image hover preview (with click to url) tooltip question
Hi everybody, I'm experimenting with an image preview tooltip with this script: http://cssglobe.com/lab/tooltip/02/ At the moment if a user clicks on the image a new page will open with that image. My question is how can I tell the script to go to a particular page (generated dynamically) on click? Anyone had any experience with a similar image preview on hover with click to a URL? Sarah
Problem call ajax in IE
Hi all, I have a ASMX service, it is return a string xml: <Catalogues> <Catalogue ID="1" Name="Test 1" /> <Catalogue ID="2" Name="Test 3" /> <Catalogue ID="3" Name="Test 3" /> </Catalogues> I use jquery to call service. In firefox, it works fine, but in IE .... This is my code: $(document).ready(function() { var webMethod = "/LVMapService.asmx/GetCatalogueList"; var parameters = "{'BlogGUID':'f990dc6b-2940-4376-a1e3-88ef7ac01d55'}"; $.ajax({ type: "POST",
.trigger() doesn't fire events not attached via jQuery
I am using this helper to attach events (thanks jresig): http://ejohn.org/blog/flexible-javascript-events/ I am not using the .bind() function, as my code needs to be framework independent. Calling .trigger() doesn't seem to fire the events attached in this way - why is this ? Is there a recommended way to attach events (without jQuery) to allow .trigger() to work? I have attached a minimal example showing the problem. The button triggers a blur, but only the JQuery event handler is fired.
jquery effect switch class problem with no dimension class
hi, first congratulation for your imperial work about Jquery which made easier and prettier the life of developer all other the world ! i have an issue using the effet switch class. My first class have a height of 200px; my second class have no height (i can't fix one because the content height is variable) so i try to put heigh:100% but the problem still here. the problem is : From first class to second class there is no animation effet like the jquery can't determine the real size of the second
AJAX loaded anchors problem
I load content to div using ajax. In that new loaded content are anchors which make another ajax requests, but they don't work. I suppose that it's caused by $(document).ready(); For example: $(document).ready(function(){ $('.dokosika').click(function(){ kod = $(this).attr('id'); pridajDoKosika(kod); return false; }); function pridajDoKosika(kod){ $.getJSON("/ajax/dokosika/"+kod,function(data){ obnovKosik(data.suma+",-",data.pocet); }); } function obnovKosik(suma,pocet){
Jquery and magento
I am want to integrate jquery with magento in the form of a mega drop down menu like asos.com. I am wondering if some people on here might assist me with this. OK so far I have downloaded jquery-1.4.2.js which i have upload to my root>js> and added a new folder jquery then I opened my page.xml and edited to call the script like so ( please see bold code ) Default layout, loads most of the pages --> <default translate="label" module="page"> <label>All Pages</label> <block type="page/html"
Jquery: problem getting the value of the clicked button in a list
Greetings, how can i do this: php: for($idf=0; $idf<100; $idf++) { echo " <button id='bttn_send_".$idf."' class='bttn' type='button' value='".$idf."'>go!</button>\n"; } jQuery: $(document).ready(function() { // inside here I need to read the value of the button has been clicked. // keep in mind I have the same .js for many pages and I can't work on the 'class' attribute of the button. }); Thanks in advance, A.
Question about .live() - intended, or bug?
Here is my test code: <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> <div> <div id="a"> <div class="foo">foo</foo> <div class="bar">bar</foo> </div> <div id="b"> <div class="foo">foo</foo> <div class="bar">bar</foo> </div> </div> <script language="javascript" type="text/javascript">//<![CDATA[ $('#a').find('.foo, .bar').live('click', function(event){ alert('clicked a -> foo/bar'); }); $('#b').find('.foo,
observerable pattern
Hi I'm using a different js lib and trying to switch to jquery. In the other lib I'm there is an observerable pattern. I'm using the observerable as my main application object. Other components, ui or not, can bind to the observerable events which are not ui related. Is it possible to do this in jquery? Are there examples how to structure a complex application in jquery? Does jqueryui handles non ui classes? Thanks
Show h3 when hovering over an image
Hey, I'm currently writing my first application in Rails and am having a few problems with JQuery. I'm basically building something similar to Apple Trailers or Trailer Addict. When someone hovers there mouse over the poster for the film I'd like the title (in an <h3> tag in the same <li>) to display beneath it. I've spent hours trying to accomplish it but feel like im in the dark, poking around. I've made some progress but it displays all <h3> tags when I hover over one film's poster. Here's a small
Are there any problems with recursion in jQuery
I'm using simple recursion to make a hidden div appear and disappear five times. My question is, is there any problem with using recursion with jQuery? Do I have to clear the stack or something when I'm done, and if so, how? I was looking at another post where someone got stack overflow in jQuery with only a few iterations. (Although they were doing something more complex.) It occurred to me that a simple jQuery call, especially with an Fx chain, hides a lot of stuff. Example: var cnt=0; function
Select Option Tool Tip
Can anyone suggest a way to show more info about individual options on a select tag. Something like a hover bubble or tooltip.
jQuery.scrollLeft, prototype and IE8..
Hi all.. I really don't know if this a bug or not.. so I posted here first... The problem is the following, if I have jQuery and prototype on a page, and if I'm using the function scrollLeft, and open the page on IE8, the scrollLeft function doesn't work.. Steps to reproduce: 1 - Create an html page. ( Valid page, and XHTML 1.0 Transitional ) 2 - include jQuery: <script type="text/javascript" language="javascript" src="/library/jquery-1.4.1.min.js"></script> 3 - Include prototype: <script type="text/javascript"
Tab help after show/hide.
<a href="#" id="link1" onclick="$('#showhide1').show('slow'); $('#link1').hide(); $('#link2').show();">Learn More</a> <a href="#" id="link2" style="display:none;" onclick="$('#showhide1').hide('slow'); $('#link2').hide(); $('#link1').show();">Hide</a> <br/> <a href="#" id="link3" onclick="$('#showhide1').show('slow'); ">See Offer Details</a> <div class="wrap" id="showhide1" style="display:none;"> <ul class="tabs"> <li class="left"><a href="#">Signature Digital TV</a></li> <li><a href="#">Internet</a></li>
Can this re replicated in jQuery? (example inside)
Hi guys, im using jQuery in a site i'm building as the main javascript api. First of all my javascript skills are quite weak, so that's why i need your advice on this issue. I would like to replicate the way the languages scroll out in this site, under the login button: https://www.betsson.com/web/en/startweb/default.aspx I would like to have a small bar in the header with a search form and have a button on the right hand side which when pushed will slide open a div with language flags which will
JS install problem in "coda-slider.1.1.1" second tab
i am using chained combox in a form. in coda-slider. but (not first) in other tab chained combobox is not run (mycodes is in attachment)
jQuery manual redirection from URL
One thing I like about the php.net website is that you can add a function name to the end of the URL and it will redirect you to the manual page. e.g. php.net/substr -> http://au2.php.net/substr It would be ace if jQuery did that. e.g. jquery.com/append -> http://api.jquery.com/append/ At the moment I either type "append" in the google search box in my browser and then click the first result, or I drill down into the jQuery website. I think the URL redirecting would speed things up a bit.
How to feature-detect/test for specific jQuery (and Javascript) methods/functions used
good day everyone, hope yer all doin awesome am very new to javascript and jquery, and i (think) i have come up with a simple fade-in/out implementation on a site am workin on (check out http://www.s5ent.com/expandjs.html - if you have the time to check it for inefficiency or what that'd be real sweet). i use the following functions/methods/collections and i would like to do a feature test before using them. uhm.. how? or is there a better way to go about this? jQuery $ .fadeIn([duration]) .fadeOut([duration])
jquery.treeview problem : addClass("open");
Hi! When I put the class "open" directly on the tag <li> it works fine. The sub-menu open as supposed. <li id="sousmenu1" class="open"><span>Title of the submenu</span> <ul> <li>Link 1</li> <li>Link 2</li> <li>Link 3</li> <li>Link 4</li> </ul> </li> But when I try to do it using javascript it doesn't work! $("#sousmenu1").addClass("open"); I know that it calls the right tag since I tried this
Code Clean Up
Sorry if this looks a mess. It does work but seems a little long-winded. What can I do to clean it up and make it more concise? I am trying to toggle the style of 4 input buttons in a form. Option1 is set to display the active style on page load. Clicking a button makes it active(on) and the others inactive(off). jQuery(document).ready(function() { jQuery("#option1").removeClass("passive").addClass("active"); jQuery("#option1").click(function(){ jQuery("#option1").removeClass("passive").addClass("active");
How to get the focus to the top of the page using Jquery
I have a long web part page with so many controls. I nee that when I click on a button at the bottom of the page it should get the focus at top of the page in order to display populated information. Thanks in advance :)
Help with Doctype and jquery selector
Hello, everyone, and please excuse my English. I'm new to jquery and I have a small problem with the selectors. In fact when I did not inform DOCTYPE in my code, the effect of opacity works fine. But when I say my DOCTYPE it looks like the selector $ (prev) and $ (next) no longer works. Here is my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script
slideToggle a page with load()?
Ok I can slideToggle a prefilled div just fine, but how do I slide down a page I load into an empty div with load()? I've tried the following: $(document).ready(function() { $("#link").click(function() { $("#register").slideToggle("slow", function() { $("#register").load('path/to/page.html'); }); }); });
Selecting an element thro ID dynamically, please help
Hi Guys I am relatively new to JQuery but well versed with JavaScript. I dont know how silly I would sound by asking thi squestion but here is my case. I have an HTML as below ==== <body> <table> <tr id="menurow"> <td id="menu1" class="menuitem_unselected" >Home</td> <td id="menu2" class="menuitem_unselected" >Records</td> <td id="menu3" class="menuitem_unselected" >Trading</td> <td id="menu4" class="menuitem_unselected" >Market Research</td> </tr> </table> <div id="menudiv1"
How can I create buttons that will make a single div scroll back and forth.
I am creating a website that uses columns (example) and I would like to be able to click left and right buttons to scroll horizontally one column at a time without the header and footer scrolling with the content. I have tried using Scrollable and JCarousel but both require you to scroll through a set of list items. I need to be able to scroll 320px at a time. Is this possible?
Firefox not recognizing parameters sent by Ajax
I have an Ajax script which works fine in IE, Opera, etc, but not in FF 3.6. It appears the data sent is not recognized. My debug alert to display a simple variable sent is blank. In other browsers it displays fine. I'm developing on my PC so shouldn't have the cross domain issue, I don't think? Here is the code function ajaxRequest() { $.ajax({ type: "POST", url: 'WTE_HTTP_Submit.cfm', data: params, error: function(e) { alert("Failure: " + e.statusText
Interesting New Gallery
Hi all, I'm new to this forum! :) I was browsing around different JQuery galleries here and there and found a couple of different quite nice options.. My main concern is a nice gallery, not too fancy, but not the plain lightview, which caters for both portrait and landscape photos alike.. without compromising either ratio or having a not-so-nice background color.. :) Until I visited Asos.com.. I'm not sure bout the other pages.. but in the homepage of the Men Section theres this nice gallery, which
How is jQuery's event info stored?
I'm trying to learn more about how jQuery actually works but I've hit a bump in the road as I've been working through the code and wondered if someone could clarify this for me. How does jQuery maintain information about elements and their bound events i.e. if you do: $(".someClass").click(handler); how does jQuery remember that binding so that when you call $(".someClass").unbind("click", handler) it knows about the click event you bound earlier? Is there a global table of events somewhere that
a little question
i am new to jquery. i have been able to make a basic script , but i have a problem. the scripts i made is for a search box , the problem is that the search lists does not expand over the page. its just moving the page more down. this is the script: <script type="text/javascript"> function lookup(inputString) { if(inputString.length < 1) { $('#suggestions').hide(); } else { $.post("http://www.ulucg.me/sugestion.php", {queryString: ""+inputString+""}, function(data){ if(data.length > 0) { $('#suggestions').show();
.text() and IE 8...
Hi Folks Looking for a little bit of help - relative noob to javascript / jquery so don't shoot.... I have the following XML data: ----- <?xml version="1.0" encoding="UTF-8"?> <pricing> <package> <name description="Package Name">Lite Package</name> <name2 description="Package Name">Lite Package</name2> </package> </pricing> ----- ..and the following code: ----- $(document).ready(function(){ var xml = $.ajax({ type: "GET", url:
How to Make FlashControl clickable
I have a flashcontrol that can play .swf movies. The thing now is that I need to embed this control in somehow to be able to click on the movie to open up a browserwindow as it doesn´t have any clickevent. I was told that jQuery can solve a problem like this as this <div> or for example <a> can´t solve the problem. I am not familiar with jQuery and would be happy to hear what a solution for this could be ? <div onclick="top.location.href('http://www.google.com/');" style="height: 300px; width:
toggle() on $('.myClass') to show/hide td fails on IE 8
Hi everyone, I'm trying to show/hide several td of a particular class on a table tbody with IE 8. It fails (by doing nothing and giving no errors), and I don't understand why. It works perfectly with FF 3.5, and also works if I put IE 8 in display compatibility mode. Toggle code is on a clickbox input "onclick" event : <input type="checkbox" name="champs[myname]" id="check_myname" onclick="$('.myname').toggle();" /> And I have some <td class="myname">...</td> Any advice would be greatly appreciated.
IE6 & 7 bug with clone and/or appending
$(".multipleSelect option").live("click", function() { var thisId = $(this).attr("id").split("-"); if($(this).parent().hasClass("add-" + thisId[1])) { if(!$(this).hasClass("disabled")) { var optionClone = $(this).clone().attr("id", "remove-" + thisId[1] + "-" + thisId[2]); $(this).addClass("disabled"); if($(this).hasClass("all")) { $(".multipleSelect.remove-" + thisId[1]).find("option").remove();
how to have an action happen only one time
hello, for example if i have the following action: when i hover into a div the background fades out, when i hover out the background fades back in. if you hover in - out multiple times , everything will happen multiple times, how can you tell jquery to have an event only happening one time (then when you refresh the page or something(pretty sure is the refresh wich guide this in the internal of Js), so when you refresh the page the event acts again regards
jQuery core method overload
Hi to all, how can I overload or extend (or intercept) jQuery's .html() method so that it works its default way unless the object has a certain class? Thanks
Next Page