[jQuery] How to use if statements with jquery???
HI, I am working on a website. A social networking site. I am making the account page. I need to fade in a menu when the user mouse is on the users image. Now I want to check if the users mouse is either on the user image or on the menu to not fade out else if the user mouse is not on either user image or the menu then the menu should fade out. how can I do this??? should I just use a if statement? any help??
[jQuery] How do I retrieve all INPUT elements from within a div
Hello all, I've a DIV that looks like <div id="left"> </div> and this DIV contains text-boxes, check-boxes and drop-downs. Say, I've to retrieve only text-boxes from this DIV--what is the best possible way to do that? Any help will be highly appreciated. Thanks, Oltmans
[jQuery] Select Element CSS Attributes
How would you select elements that have CSS background images ending with .png? And then add a class.
[jQuery] [validate] Attaching events to dynamically added fields
Hi Jörn or anyone else familiar with this plugin, First off, thanks for the great validation plugin. I hope I do not impose too much with this question. I have a dynamic form with fields named using brackets ([]). Validation is working for fields that existed on the initial page load, but when I add append the code for a new field, the validation events are, of course, not attached to the new DOM elements. What's the best way to accomplish this? Rob
[jQuery] jqmodal nested ajax
Hi, Is it possible?? the plugin page doesn't have an example of this...Or is it at least possible to replace the current modal content with another ajax content in the opened modal (only one modal...not nested)...How? Thanks! BR
[jQuery] [OT] teaching jquery instead of javascript ?
Hello mates, I will start to teach web usability to freshly graduated youngsters in a graphic design school _ web dept, web dept. The Board recently proposed me to also take over javascript. Now i intend to them i'm not literate enough in javascript to actually teach it. But i proposed instead to teach jquery, with the main argument being: it's a 3-year programme, it's not with 2 hours a week that most kids will get professionnal level javascript skills. Teaching jquery on the other hand, may give
[jQuery] Superfish Righthand Side of Window Folding
Hi there, Is there a way to get the Superfish menu to fold back if child items are too close to the righthand edge of the window, rather than go off screen? An example of a menu which does this is: http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2 Thanks!
[jQuery] Attach events to items before $(document).ready
I've got a field on a web page that needs some javascript behaviour when it gains or loses focus, so I attached the appropriate handlers in a $(document).ready to the field. It all works fine, except if the user focuses the input field before the ready event fires. In this case the behaviour doesn't occur. The old version used onfocus and onblur attributes in the tag itself, which is obviously a very bad way of doing it, but did have the advantage that the behaviour would occur as soon as the input
[jQuery] Need help with a Jquery toggle bug in my menu's
I've got a full width drop down menu setup, using jquery's toggle to show/hide the hidden divs when the user clicks on the one of the <li> elements or any of it's children. The problem I'm having (and it's kind of hard to reproduce), is that if the user has their mouse over one of the <li> items while the page is loading, the toggle becomes confused, and believes that on is off and off is on. Basically giving you a flickering menu. Here's my Jquery code: $(document).ready(function(){ $("li.main-nav").bind("mouseenter
[jQuery] Tutorials or examples of jQuery and ColdFusion?
Hi, all... I think I saw it mentioned that someone had written some examples of using jQuery on the front-end and ColdFusion on the backend for ajax work. Most of the stuff I find on the 'Net with jQuery and PHP. Perhaps the examples were written in conjunction with a plug-in? I'd appreciate any clues. Thanks, Rick
[jQuery] display:block with jquery
how can i add display block to an element with jquery
[jQuery] how to select all first td's inside all <tr> in a table
I have a table that contains several <tr>, all of them look like this. <tr> <td>20-04</td> <td>459</td> <td>559</td> <td>659</td> <td>439</td> <td>519</td> <td>599</td> <td>424</td> <td>489</td> <td>554</td> </tr> <tr> <td>27-04</td> <td>506</td> <td>606</td> <td>706</td> <td>486</td> <td>566</td> <td>646</td> <td>471</td> <td>536</td>
[jQuery] simple problem
hi all, i m unable to find the img and its src attribute... when i write alert($(myobj[1][$c]).find('li').html()); i get the output <a class="" title="zp0790.tmp.jpg" href="#"><img src="PropertyImages/ 20081222160549.jpg" width="50" height="50"> </a> alert($(myobj[1][$c]).find('li').find('a').html()); <img src="PropertyImages/20081222160549.jpg" width="50" height="50"> but when i try alert($(myobj[1][$c]).find('li').find('a').find('img').html()); i get no value or empty value .. can u plz correct
[jQuery] jQuery - Binding to Ajax Event
Hi all I am developing a portal and i am kind of stuck. I am using multiple AJAX calls to get data dynamically from a JSON file. In one page I am making 2 AJAX calls, and I want to call a function on call back from AJAX. I found out a way to do it, its something like this, $(window).bind("ajaxComplete", function() { function1(); }); Now problem here is, function1 is being called twice, on each AJAX callback. Is there any way so that i can call function1 only once. Thanks
[jQuery] scrolling page when mouse at edge.
Hi, somewhat off-topic, but jQuery is the javascript library I've chosen... I have a menu that is longer than the page. When I go down this menu with the mouse I would like the page to scroll in the same direction and speed as the mouse. I guess scrolling should actually only happen if I get at the very edge of the page otherwise it could be quite annoying. Thanks, Bryan Rasmussen
[jQuery] (smooth) scroll to anchor but...
...what if the areas i need to scroll to are defined as anchors in html <map> elements on top of a large inline image? and the areas that trigger the links are image map areas too. clicking on the image map areas scroll from one area to another. ideally not using absolute positioning, but with html anchors and their IDs. i tried modifying this technique here for no avail: http://www.learningjquery.com/2007/10/improved-animated-scrolling-script-for-same-page-links and this one here: http://plugins.jquery.com/project/scrollto
[jQuery] Select inputs
Hello! How can I select all checkbox inputs which names/ids starting with "xxx"? I tried this, but not working: $('input[name=xxx*]')
[jQuery] Dynamic select menus widgit
I have a script that selects rows from a database with a select menu for each field. Some php runs prior to page load to populate the options. When the user clicks on an option, jquery asks a script to have the remaining select menus have their options re-populated based on distinct values for the rows that match the selected option(s). The submit button is overwritten with jquery to ask a php script to return a table for the rows that match all of the selected fields. In order to prevent the select
[jQuery] Trouble refreshing div with .load
I'm using the following code to refresh a menu based on a user's access privileges. The login is via a modal window. $.ajax({ type: "POST", url: "login/login_processor.cfm", dataType: "json", data: formval, success: function(response){ if (response.login == "Login Successful") { $('#logstatus').empty().append("Log Out"); $('#menu').hide(); $('#menu').load("includes/include_menu_index.cfm").show(); tb_remove() } It's performing
[jQuery] get tag name
<select name="month" id="month" > <option value="" SELECTED></option> <option value="1" >January</option> <option value="2" >February</option> function do_something_based_on_tag_name(selector) { if(???=='select') {} } var selector = jq('#month'); do_something_based_on_tag_name(selector); How do I get tag name from "selector" variable?
[jQuery] Validation: Which and why...
I am wondering what the relative advantages / disadvantages are of validating purely in php vs. in jQuery.
[jQuery] Highlighting the first element in multiple DIVS
Hello, I am looking for some guidance on how to achieve a simple objective. I have multiple <DIV> elements on a page, and within each <DIV> there are 4 <A> elements. Within each <A> there is an <IMG>. My goal is to apply a class to each of these <IMG> upon rendering the page. <div class="description"> <a class="colour" href="#"><img class="icon" src="/images/icons/ snowwhite.png" alt="Snow White"></a> <a class="colour" href="#"><img class="icon" src="/images/icons/ deepcream.png" alt="Deep Cream"></a>
[jQuery] Correct way using Jquery
Sorry this might be really simple but there is a reason my nickname is jq noob! I was wondering how to convert this JS function into proper Jquery code. function uncheckRadio(obj) { var choice = eval("document.editResource." + obj.name); for (i = 0; i < choice.length; i++) { choice[i].checked = false; } }
[jQuery] showErrors and errorPlacement [validation]
hello i got a nice form system going with some custom placement of errors but i want to also count the amoutn of errors and display that as well. How can i do this in code? i have this : errorPlacement: function(error, element) { error.appendTo( element.siblings('span.valmessage') ) } which displays the errors were i want them but when i try to use this as well to have a live view of the amount of errors: showErrors: function(errorMap, errorList) { $("div#formerror span").html("Your
[jQuery] newbie code assessment please?
I'm using a lot of jQuery for my new site, and wonder ... How can I better compress my code, which seems very long. If any kind souls could tip me off with some pointers, I'd be much, much, very much obliged. Olly the_guv guvnr.com The site is http://guvnr.com My jQ is (hopefully fairly self-explanatory) ... (html follows) ... jQuery.noConflict(); // *** POPUPS/SERVICE PANELS *** (this largest section of code controls my tab panels for the sections titled Web, Content, PC, Blog, Me and Content...)
[jQuery] Finding a tag on a page
I'm new to Jquery, and wondering how in JS using JQ how I can find a specific control on a page based off it's ID. Also can I use it's .net ID, or do I need to use the ClientID? I'm assuming ClientID.. $......find("ControlID")
[jQuery] Problem setting html in iframe.
Hallo all. I would like to set the html content of on iframe via jquery, I have a page where is defined the iframe: ....... <body> <iframe id="operativita" height="500" width="100"/> <div id="myDiv" class="block"></div> </body> and via jquery I set the html like this: jQuery('#operativita').html('foo'); jQuery('#myDiv').html('foo'); It works with the div but not with the iframe. I tried several ways (e.g jQuery ('#operativita').contentDocument.innerHTML = "foo"); but none of them
[jQuery] Ajax: how to choose between post, get or ajax() ??
I need to silently update an xml file to store some user's usage statistics, basically i pass an object to a php script, which generates the xml and stores it in a file. Now, looking at the ajax chapter of the docs, i'm not quite sure what's the best method to do that: $.get, $.post or $.ajax ? I think $.post() is good enough for my need but i'd be very interested to hear your opinion. thanks! Alexandre
[jQuery] Get TD Position [X, Y]
hi all, I want make simple sub menu, id mouse over the column of table will show the div with some text finally. can i get the XY position foreach column in table?! JQuery Code $(".left_menu_td").mouseover(function(){ $("#sub_menu").css({"top":this.position().top, "left":this.position.left, "display":"block"}); }); HTML code <div id="left_menu"> <table class="left_menu_table"> <tr><td class="left_menu_td">One</td></tr> <tr><td class="left_menu_td">Two</td></tr> <tr><td class="left_menu_td">Three</td></tr>
[jQuery] adding a class to an object if the next object has the same attribute value.
Hello to you all, I have looked in this group and could not find anyone trying the same thing as i am trying to accomplish. I am trying to add a class to an object if the next object has the same attribute. I don't know the name of the attributes value the 2 have in common. the code i have is: $(".row > div").next("[Type=SameValue]").addClass("RED"); This works fine. but i want to replace the "SameValue" with something like but somehow this doesn't work: $(".row > div").next("[Type="+$(this).attr("Type")+"]").addClass
[jQuery] Call object method onclick
function Viewer() { }; Viewer.prototype.constructor = Viewer; Viewer.prototype = { getFullAreaId: function() { return this._fullAreaId; }, setFullAreaId: function(fullAreaId) { this._fullAreaId = fullAreaId; }, initialize: function() { $("#thumbs img:first").click(/* execute this.doX on mouse click */); }, doX: function() { alert(this.getFullAreaId()); } }; How can I make the click event execute the doX method? Regards, FatSlags2004
[jQuery] Searching a DataGrid PlugIn
Hello, I'm searching a DataGrid PlugIn. But I can't find, what I'm looking for :-( I need one feature badly: The Grid should use the complete content panel. So it needs to resize the width and height, when the browser resizes. I took a look at flexigrid and jqGrid. But they don't have a feature like this... Perhaps someone can help me out on this. Greetigns, Stefan Sturm
[jQuery] cycle plugin calling onclick function automatically
I've posted troubles with this site in the past. I'm still having some problems with the cycle plugin. Here is the URL: <a href="http://adc4web.adceval.com/#_contact-us">http://adc4web.adceval.com/#_contact-us</a><div> </div><div>What happens when you go to that url is that it first goes to the home page and then uses the cycle plugin to transition to the "Contact Us" page. However somewhere along the line while or after the cycle plugin is used it calls an onclick function that I have set on
[jQuery] ajaxForm with validate plugin - doubleclick form submit issue...
Hi, I am having a strange issue with ajaxForm...this form load normally without ajax call but I use ajaxForm for form submit. This form get submitted only on <b>double click of submit button</b>...Any idea why this behaviour? I am using validate plugin for form validation... Here is my code... // prepare the form when the DOM is ready $(document).ready(function() { $('#password').pstrength(); $("#accountSettingForm").validate({ // validate Account
[jQuery] help me in jquery show( speed, [callback] ) effects
hi I am new to jquery, i have on form with 3 images, i want call show( speed, [callback] ) function when clicking particuler image only for example <img src="welcome.gif" width="61" height="63" border="1" id="dd"/> <img src="welcome2.gif" width="61" height="63" border="1" id="dd2"/> <img src="welcome2.gif" width="61" height="63" border="1" id="dd3"/> i want call show( speed, [callback] ) when clicking welcome.gif image only
[jQuery] bind the same functionality to load and change event
hi there, i want to execute the same lines of code when the site has finished loading AND when an onchange-event is fired. i tried something like $("#properties div select").bind("ready change",function(e){ $("#properties div select").bind("load change",function(e){ but this does not work :/ can you tell me how to do something like that? thank you!
[jQuery] In a pickle -- JavaScript Pagination vs. PHP/MySQL Pagination
<--- here is a picture of me I have a jQuery sortable table with jQuery pagination, which is being fed from PHP/MySQL-- and now that I have it setup, I am in a pickle. It appears I can only have cake or eat it. I want a table that loads fast from MySQL, that I can paginate (for performance) AND i can sort, however when you break the SQL rows returned, you can only sort the table based on the limited results (ie- sorting a table based on 40 returned results, instead of sorting based on the 800 total
[jQuery] Joomla and jqGalScroll
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> Hi there, i am not sure if i am writing to the right place:)<div>Installed jquery into the joomla, posted, works great</div><div>Only one thing it's shows the bullets beside every image, and between pagination numbers</div><div>It works fine on regular html page...</div><div>Please help?? <div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family:
[jQuery] Between document communication...
Hi, I have not easy stuff to do...maybe you know solution. I have simple jquery page. There are button and ui.tabs widget with ajax mode page (a href="page.html"..) Button has $("#button").click() ( function and never might be clicked directly by mouse button. This function should be invoked only from page.html level. I know that it is two diffrent documents How to do it? I was looking some but I am not sure how to call it? callback? parentwindow? help.. thanks, Piotr
[jQuery] sent a message, nothing visible
just send a message here, but it doesnt appear since 2 hours. so this is a test...
Next Page