What is the best way to use jquery in different pages of a 100 page website?
Hello; It seems that the correct way to add scripts is to do this in the header: <script src="myscripts.js"></script>. What happens if each of my pages need a variety of unrelated specific scripts? How can I tell the header to add scipt1.js if this is login page, add script333.js if its another page..? Should I make hundreds of different scripts? Or should I add some scripts in each file? Thanks
Question about gallery
Hello, everyone! I'm newbie in jQuery. Tried to make a gallery with thumbnails and "next/prev" buttons navigation. Then I've get lost in all the functions, so I stuck. For now, the buttons just move the slider with a thumbs, but they don't select them. Here comes a code: var x=1; $(document).ready(function(){ $(".tmb_slider img").click(function(){ $("#pic").attr({"src":"gallery/big_thumbs/"+$(this).attr('ct')}) $(".tmb_slider img").css({ "border":"2px solid #FFFFFF" }) $(this).css({
Loading form result in same page
I have a form and I want to load the results from it into a div. I've already searched some topics about this but it doesn't. I would really like to show the results from the action url (http://wl.breedbandwinkel.nl/postcodecheck) into <div id="test">. Currently I'm doing this within an iframe but that just doesn't look "professional". And if possible I would like the form being replaced by the loaded data. I hope I gave enough information, if not let met know. This is my code so far: <script type="text/javascript">
Qs for profissional jquery how to extract URL from string and
how to extract full url from textarea and if content http://domain.com/xxxxx/?xxx then change it to http://www.domain.com/xxxxx/?xxx and if www.domain.com/xxxxx/?xxx then change it to http://www.domain.com/xxxxx/?xxx and if domain.com/xxxxx/?xxx then change it to http://www.domain.com/xxxxx/?xxx Please help me please
Copy element from one div to another but reain in "from container"
There a re 2 containers Container from <div class="search" id="fromdiv" style=" position:absolute; display:none; left:146px; top:148px; height:300px; width:300px; background-color:#CCC" > <table width="100%" border="0" cellspacing="0" cellpadding="0" id="headertable"> <tr> <td align="right"id="headerclose" class="Line" style="cursor:pointer">close</td> </tr> <tr class="headerlist" > <td id=66>other</td> </tr> <tr class="headerlist" > <td id=67>Place</td> </tr> <tr class="headerlist" > <td id=68>Profession
No Caching CSS Selector in Menu
I have a jQuery menu that adds the class selected to links in a menu. The problem is that when you click the back button the class of selected remains on the link you just visited instead of for the link of the page you are actually on. So far I've tested it only on FF, IE and Chrome. This problem is only encountered on FF. I was wondering if there is a way in jQuery to not cache that class. I know there are ways to not cache the whole page but I don't want to go that route because it slows down
Fading between two images based on time
Hey everyone, hopefully this will be a quick question for you guys. Here's what I have going on. I have these two images at the very top of my body - they will serve as the background to the page. <img src="image1.jpg" id = "background" > <img src="image2.jpg" id = "background_hidden"> Here is the corresponding css for the two images: #background { width: 100%; height: 100%; z-index: -1; position: absolute; } #background_hidden { width: 100%; height: 100%;
After successful validation form not submitting
hi, i used jquery to validate the form after successful validation form is not submitting but it returns true value, and not redirecting can any one guess the problem and give the solution Thank you........
Help with Jquery - Newbie
Hi I have this on my website, basically a quote form which should allow people to get an instant quote, but it doesnt work! to view the form onlinewww.christianvelectrical.com then instant quote...any help would be appreciated!! here in the JS (function($) { $.fn.ajaxfileupload = function(options) { var settings = { params: {}, action: '', onStart: function() { console.log('starting upload'); console.log(this); }, onComplete: function(response)
Start Video Files After Checking if All Fully Loaded(Bufferd)
Hi Using jwPlaye 6, I am running this code to display two videos which must start simultaneously.the problem is on of the video file is always bigger size than the other and this causes some delays at the start of that file which is not perfect presenting.Besides sometime there are some pauses at the beginning of videos which make video presentation look awful. Here is the code I have: <script type="text/javascript"> jQuery(function ($) { function stateListener(obj) { $('#state_change').text(obj.oldstate
Changing page div to external page
Hi, i was hoping that someone might be able to help. I need to have only 1 page visible at all times. All navigation is done through a single DIV. I need to be able to change the content of the DIV with the click of a button and the content is from external pages kept in the same directory. Is this possible? the external pages are not heavy but have images & text. I have a demo of pagify.js but i just cannot get it to work. Im quite new to jquery but im a good learner. Ideally, it would be great
Difference between Windows 7 Home and Windows 7 Professional executing jQuery?
I'm a programmer for our company and recently we noticed that there are some features that no longer work on the site when viewed in IE9. These features are run by jQuery (and jQuery on the site is the latest version). If you were to go to http://lookingyourbest.com Scroll down to see the Featured Doctors, Click on any doctor, Then click on "Email" it should bring up a form on an overlay. Now, I installed Windows 7 on another computer (I use Linux) in order to run some testing. And out of the box,
Divs get overlapped in jquery
I have written a small code in Jquery. In this code there is button for moving "div's" to left and right respectively. And the "div's" also scroll to left after every 5 secs. But the problem is once in a while the div's get overlapped. I was wondering if anyone could may be solve the issue. This is the link to the code. jsfiddle.net/9FPBA/2 this above link has its own editor so you can edit the code from there itself. Any help wud be appreciated. This has been bugging me for a long time now
jqury datepicker disabled days
Good morning from Santo Domingo I love Jquery !!!!!! Please help me with this , I'm using Jquery datepicker daterange and I need to disable some days dinamically controlled from a textbox on my form. The default value of the textbox is [2, 4, 5] and i want to pass this value to the var daysToDisable like this : var daysToDisable = document.myform.mytextbox.value; instead of : var daysToDisable = [2, 4, 5]; But it's not working . Why it's not working , where is the prolem ? This is
Load function into a .load call
Hi. I have a function named 'validation'. Instead of copying this function into my load call I was hoping there is way to just call that function. $(function validation() { function code... }); $('#payment_method1, #payment_method2').change(function(){ var path = '/basket/dynamic/'+$(this).val(); $('#checkout_form_container').html( 'Updating…' ); $('#checkout_form_container').load(path); }); Is it possible to do something like:
Unlimited Drop Down Menus - triggered onchange one by one
Hi all I need to build a form which has (for example) a drop down menu of Car Components to start with. When a user chooses a component from the drop down mene, I need a new drop down menu of the same components to appear underneath. And thus the process continues. I do not need to filter out previous selected options from the subsequent drop down menus, it will essentially be the same drop down menu every time. Is there anything out there that does what I need that I can refer to? Many Thanks
Mouseleave only triggering as expected in Chrome
Hello, The following seems to work only in Chrome, and it does not seem to work in IE8, FireFox, and Opera: $("#divMain").on({ mouseenter: function() { $(this).closest( ".widget" ).find( ".divButtons" ).show(); }, mouseleave: function() { $(this).closest( ".widget" ).find( ".divButtons" ).hide(); } }, ".widget"); In Chrome, if you drag the ".widget" far enough away from the other widgets, so when you let go of the ".widget", so the mouse pointer is not hovering over
select jquery
this script works in a select, how can remove the value append bellow? i had tried else but not working. and another thing, if a click in another select and click in report a problem, appear again the input and button, how can put this for appear only one time? thanks. <script> $("select").change(function () { if( this.value == 'report a problem' ) { $('div').append("<input type='text'/>","<button>save</button>"); } }); </script>
About jquery slider range validation???
How to use slider range with change events, becoz when i change events and use _dopostback() full page post back but i want only a div is post back, and slider range is not change.....???
click even firing difference between 1.8.0 and 1.8.1/1.8.2
I am having problem with click event. It fires if I use 1.8.0 but does not when 1.8.1 or 1.8.2 is used. I am using jQuery with Backbone and jQuery Mobile framework. I am not sure if the problem is related with that but I was able to narrow it to the following lines: for 1.8.0 it's 3009-3039 for 1.8.1 it's 3013-3043 it (1.8.0) has changed from selMatch[ sel ] = jqcur.is( sel ); (line 3030) to this (1.8.1) selMatch[ sel ] = jQuery( sel, this ).index( cur ) >= 0; (line 3027) this one line makes all
Simulate hover
I have some div's ([class^="exhibit_caption_img"] & did have a function that fires on hover, but I put a wrapping border "[class^="exhibit_caption_imgbord"]" on top of it to mask some stuff, so now the hover event isn't registering. Tried this function: http://stackoverflow.com/questions/6157929/how-to-simulate-mouse-click-using-javascript/6158050#6158050 by TweeZz The callout suggested this: simulate(document.getElementById("btn"), "click"); Tried writing it in jquery like this: $('[class^="exhibit_caption_imgbord"]').hover(function()
jQuery.post potential max_user_connections error
If I am making a request via jQuery.post to run a PHP function it is possible on a heavily trafficked site for an Apache server to have reached the limit defined by max_user_connections. This means that a new process cannot be created, that is the PHP function will not be executed. What does jQuery do if this occurs? 1) does it just continue on without having executed the function so that the user wouldn't even notice that something has failed? 2) does it cause the script to crash and therefore cause
Limit characters in a div
Hi. Can anyone tell me how its possible to limit the amount of text characters in a div. I want to be able to limit to say 200 characters, then display a 'read more' link, when clicked it slides down the rest of the text. I have had a look around, but have only been able to find limiting text in textarea's. Thanks.
How Do I Debug "Invalid Argument" Ajax Error?
I'm getting an Ajax error in Internet Explorer 8 and 9; no other browsers have a problem. By inspecting the jqXHR object, I can see the error string is "Error: Invalid Argument". This seems to be a generic Internet Explorer error not specifically related to Ajax - the HTTP request doesn't even happen. The problem is, jQuery seems to be catching this error. I can't get a backtrace or anything. How am I meant to find out where IE is throwing this error? I'm seriously frustrated right now. This is something
Problem with $.each through json object
Hello, I am having the strangest problem with $.each through a json object. Im trying to iterate through the object, Im obtaining addresses to pass to the google geocoder for mapping. When I run the function all the red alerts are appearing then all the green are appearing. It is supposed to display red and then green over and over. Does anyone see anything. Or do I not understand the $.each function. $.each($json.PDMOVE, function () { var nocntrs = 'No Containers
Triggering the rerender of input fields.
Hi, How is it possible to trigger the rerendering of an input field after the page is loaded? We want to change the disable/enable property of the field an after that rerendering it. Thanks, Altran
Cannot read property 'length' of undefined
Have an application to concatenate a new blank array with selected objects of another array. The code reads the parameters and values of each object of the initial array. This same code is used for the populated second array. The execution of the code stalls on line 583 of the jquery-latest.js file. The error message says "Uncaught TypeError: Cannot read property 'length' of undefined". I saw an earlier post for this error message, but there wasn't much detail and it was closed due to lack of response.
Rerender an input field in a VisualForce page
Hi, How is it possible to rerender an input field in a VisualForce page using the onchange trigger of a select list. We defined the function disable to enable or disable input fields acording to some conditions (see function below). This function is called in j$(document).ready(function() and it's functioning well when the page loads. We call this function also in the trigger onchange mentioned, but we need that the input fields get rerendered. What statements must we add in function disable()
how to append long html files WITH SPACE?!
if this code will be long html codes as 300 lines. You have to write codes without space. But any Code Editor gives space between of tags. And I have to delete all space. Is there any solution for it? $("body").append($("<div id='dzndiv'><div style='position:absolute;left:0px;top:0px;width:100%;height:800px;'><img src='img/transparent.png' width='100%' height='100%'/></div></div>")); it is not true but solution example like this or equal?: $("body").append($.load("longstuff.html");
How to keep an $.ajax connection open in order to retrieve data regularly from server?
Hi all, I've used jQuery.ajax function to request data from AJAX-enabled WCF service. Please look at the following code. It seems that poll function opens a new connection for each jQuery.ajax call because IIS server is not responding after 10 connections (ajax call) although one web page is opened on browser. How to keep an $.ajax connection open in order to retrieve data regularly from server? Thanks a lot for your helps and clarifications, function poll(urlString, data, fnSuccess, fnError)
How do I generate .post() return values in PHP?
Hi, I've attached the code I'm currently writing as an attachment to this post. It includes both javascript and php for what I'm trying to do. Note that this problem is related to implementing AJAX into wordpress, so any knowledge about Wordpress helps here. What am I trying to build? I wish to build a AJAX loading system for every segment of wordpress. Lets start off with my PHP for wordpress here i initiate 3 scripts one, for JSON2 as it is said to be a more reliable parser than the one included
Not displaying map within modal screen
Hello, I cant seem to get my google map to display in my modal. The code is as follows. Does anyone see anything. Thank You var mapOptions = { zoom: 4, center: centered, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('maparea'), mapOptions; var marker = new google.maps.Marker({
Accordion JQuery MySQL menu
Hi, Thank you in advance for your precious help. I would like, if it is possible of course, the clicked button to be active and the category expanded (open) when the desired page is loaded in a new window -- when the visitor has clicked to consult all the items of the selected category. Pleade find below the code: <div id="menuCategories"> <ul class="topnav"> <?php $query_categories = mysql_query("SELECT * FROM " . categories . " WHERE parent_id=0") or die("" . $MySQLError . ""); while($row
UI Tooltip: tracking and closing in ajax application
All, I have a ajax table editor (MATE) that typically has an header row with a columns caption. The column caption is clickable to sort the column. So there is a <a> tag inside the <td> tag that fires a javascript ajax request to reload the table. When i add a title attribute to the <td> I see two issues. 1 when i set the tooltip to track the mouse it follows nicely through the table cell until I hit the <a> tag. Then the tooltip goes and stays at the lefthand corner of the tablecell 2 clicking
I have a problem with .find in Unity.
Hi, I am having a few problems with my game in unity I have created to play against the computer in a ball game the problem is the fact that I have made the computer completely impossible to beat unless the speed of the ball glitches through the Paddles / Bats. If anyone has any way for me to be able to make the computer have like a percentage chance to get the ball would be great help. Thanks Lenny... Code is Below. This is my Code for the Ball: var speed : float; var speedX : float; var speedY
JSON Object Special Character Issue
Hi There! I am using jQuery v1.7.1 in my Application. When I Use $.getJSON Function, it is getting failed when there are some special Characters. For example When I post a JSON Object like below { "aaData": [["","PLANNED ORDER","FAILED","---","79802","2012-10-19","MN_ORES_GEM_PE","M201","0001","GENERIC","50000","TO","Invalid Quantity Unit Code - TO;"],["","PLANNED ORDER","FAILED","---","79803","2012-10-19","MN_ORES_GEM_PF","M201","0001","GENERIC","22500","TO","Invalid Quantity Unit Code - TO;"]]
Submitting form using enter key
Hi Dear JQuery programmers, Good Day ! I am trying to use an image based hyperlink button for submitting form. So i am able to click on the image and submit form. Now requirement is to submit form if enter key is pressed in page. I copied some code from net but unable to work. Below is my code. Please correct me if i am going wrong somewhere. Thanks in Advance ! <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="login-box.css"
[Galleriffic] Open image in bigger size when clicking on it
I'm trying to customize my gallery with Galleriffic http://www.twospy.com/galleriffic/example-2.html But something important for me, is that when you click on the picture, a bigger version of itself appears (as a lightbox pop-up), instead of just switching to the next one. Anybody could help me with that ?
Language issues
If you look at http://www.whiskeywildcomo.com/media you will see a script that is loading images/albums from the Facebook page. You will notice that the language is a bit off. For example, "53 Fotos" instead of "53 Photos" and if you click a single image in an album, it has foreign text for "Go Back". I have already updated these labels in the .js file but no idea why they aren't displaying correctly after being changed. Any ideas?
why are my fancybox thumbnails doing this?
I merged the roundabout and fancybox plugins together to make 1 carosel/gallery plugin... if you look at this example you'll see the thumbnails work fine.. just click on the "color options" link below the t-shirt.. http://optiq-customtees.zxq.net/fancyboxtest.html now if you go to this example where I put it in the roundabout plugin and click "color options" you'll see that the thumbnails are shaped differently, don't display the full image and does this flickering thing when you roll the mouse
Next Page