defer parsing of jquery
Hi All, I am using below js code for jquery defer parsing. Here is my code: <script type="text/javascript"> function downloadJSAtOnload() { var element = document.createElement("script"); element.src = "jquery-1.3.2.js"; document.body.appendChild(element); /* $(document).ready(function(){ $("a").addClass("test"); }); */ } // Check for browser support of event handling capability if (window.addEventListener) window.addEventListener("load", downloadJSAtOnload, false); else if (window.attachEvent) window.attachEvent("onload",
Help with equivalent jQuery instruction :)
i have this javascript code: var message = data.getElementsByTagName("message")[0].childNodes[0].nodeValue; Message is an XML formatted string which i receive from the server. What is the equivalent jquery code for my instruction? Thank you.
Dynamic content generation breaks image slider.
Hi, I'm very new to this, I have been modifying a wordpress theme and I have come across an issue. The page I am working on is a portfolio page, It uses dynamic content generation. It pulls up all portfolio posts. I have added an image slider to each portfolio post. My original problem was that only the first portfolio items slider would work and the rest would not load. So I changed the script for the page to get it to call up the new slider for each project. My problem now is that if I click back
loading xml on chrome.
:) i am new to html5 and jquery development. i have a problem loading xml with jquery apperantly only on chrome. this is my site: http://shaharmesh.hostingsiteforfree.com/ you can see that the protfolio section working fine with all browsers exept chrome. when i open the chrome javascript console i can see this log: event_bindings:232 Failed to load resource: the server responded with a status of 403 (Forbidden) ... i am using: $(document).ready(function() { $.ajax ({ type: "GET", url: "../Assets/protfolio.xml",
A jquery picture slider/lightbox2 issue
I am creating a picture slider show for someone using jquery, it has a previous and next button. Here is also what i'm trying to acommplish. Whenever the user ciicks on the image, it enlarge the image. I am using lightbox2. Now, I have no idea why the slider is not workin. the image will "enlarge" http://www.rodriguezstudios.com/division9/gallery.html Here is the html, jquery,l and css code html <div id="information"> <h1>Gallery</h1> <div id="container"> <img id="prev" class="prev" src="Gallery/buttons/prev.png"
Getting window size to php variable without pulling a second page.
I have a search script I wrote in php which parses any url and returns data based on the url and it uses the SHTML and apache forcetype to use only one page. I've rewritten the code to use a fluid page layout. I'm trying to get the the browser window size so if they are on a phone it will pull smaller ads and on a desktop it will display the larger ads. I have tried a lot of different scripts and got it to work if it pulls a second page while setting a session var but it messes with the parsing...
Jquery Cycle, multiple slideshows -> breaks when slideshow div only contains single image
Hello, I'm trying to make the jquery cycle plugin work for multiple galleries on a single page. In general it works fine, but when a slideshow only contains a single image it will break the slideshow Here is the code: $(document).ready(function() { //cycle options for news section $('.slideshownews').each(function(){ var p = this.parentNode; $(this).cycle({ speed: 200, timeout: 600, fx: 'fadeout', prev: $('.prev', p), next: $('.next',
can not enhance page or listview to get it to genererate thumb css
I tried create a page following the thumb listview example. I start with an blank html page, then dynamically inject a listview with an image in it, call $page.trigger("pagecreate"), everything works like the example. <li> gets a style ui-li-has-thum, and <image> has style ui-li-thumb. However, if I add the listview w/o the image first, then inject the image and call either $page.trigger("pagecreate") or $content.find( ":jqmData(role=listview)" ).listview(), the page comes out without these styles,
Post DatePicker (yyyy-mm-dd) OnSelect to php mysql
Hi, I've been trying for a while now to get the following code to Post to a php/mysql page, but no luck. Can anyone please help? Thanks. <script> $(document).ready(function() { $("#datepicker").datepicker({ onSelect: function(dateText, inst) { $.datepicker.formatDate('yyyy-mm-dd', new date(dateText)); $.post("phpMysqlInsert.php", {visitdate: dateText} ); }}); }); </script> <div id="CSSformat"><div
1.2 popup picture gets blurry on my Android 4.0 phone, also on the demo page
I'm trying out the new 1.2 popup features and I've tried to make a nice popup picture with it on my site. It worked really nice at first but, when I added the dark semi transparent background (the 'screen' as they call it) the picture turns really blurry/low res. Actually when I open the popup the picture shows right away but the dark screen takes a moment to show up, along with the blurriness. I turned off all animations on my site but the dark screen still seems to fade in. I tried if the popups
Handling Event Propagation on an Expandable Menu?
So, I've got the following expandable menu: <ul id="navigation"> <li><a href="index.html">HOME</a></li> <li><a href="aboutus.html">ABOUT US</a></li> <li id="expand"><a href="collection.html">COLLECTION</a> <ul id="active"> <li><a href="collection1.html">ANTIQUE DOLLS</a></li> <li><a href="collection2.html">DOLL ACCESSORIES</a></li>
How to achieve this effect of tool tip? shorter, please
How to achieve this effect of tool tip? shorter, please See project: http://jsfiddle.net/biofusionart/4esNj/4/
How to Embed YouTube video in jQuery Mobile Website
Nobody seems to have asked about YouTube embeds here, so it's probably a dumb question, but every attempt I've made to embed a YouTube video in a jQuery Mobile page or dialog results in a cross-domain JavaScript error (Chrome) or "Permission denied to access property 'toString' (FireFox). I can generally get one video to play in, say a dialog, with the iOS simulator, but the Website doesn't work the way it is supposed to afterwards, the breakdown apparently resulting from JavaScript cross-domain
More efficient method?
Is there a more efficient method to go about doing this? I want to call the data on page load, and then start running through the intervals. My current setup: $(document).ready(function(){ //run it on startup $.ajax({ url: "js/latestNotice.php", cache: false }).done(function( notice ) { $("#notice").html('<b>Latest Notice:</b> ' + notice); }); $.ajax({ url: "js/online.php", cache: false
$(this) inside append()
hi, i would like to append the name attribute as text for some elements on my web site to test something. i have tried: btn_group = $( '.btn-group.alive' ); alert( btn_group.attr( 'name' ) ); //this give me an alert with the right name (it work) btn_group.append('<p>' + $this.attr('name') + '</p>'); //wich doesn't work.. how can i do it?
Cancel bubble in Colorbox
Hello. I use colorbox on a button. The button is placed on a div. Clicking anywhere on the div perform some action. When clicking on the button, both the colorbox and the div under it are activated. How do I stop/cancel bubbling when clicking on this colorbox button? Thanks.
Jquery remote ignoring / breaking CSS?
Hi all, I’m having a problem with JQuery validate remote calls, the basic idea is that when an existing record id is input it is checked against the DB and an error message is shown. All the validation itself works fine (i.e. error messages are shown for all incorrect fields ) but the problem is that when remote validation is called only the CSS for the remotely fields CSS is changed on error even if other fields are incorrect. When when the details in other (none remotely validated) fields are
Vertical space between images
I'm using jqm for a while now and since the beginning I stumbled upon an image problem. Working example: http://www.m00x.com/jqm/image.html Whenever I put an image on a page, it has a space under it of 5px. This problem consists on both pc and mobile browsers. The space ain't margin, padding or a border. I've put those on 0 to be sure. For now, I always fixed it the dirty way: img { margin-top: -5px; } But, of course, I dont feel happy with it :-) Below is the code I'm using. Even in a very basic
Call function every thirty seconds?
(ignore the 500 please, that's just for testing purposes) $(document).ready(function(){ setTimeout(function(){ alert('hey'); }, 30000); });Any idea regarding this? I've looked up several questions on google, although I haven't found a specific answer sadly enough.
Help needed: Integrating a domain checker on to a JQuery Slideshow
Hi all, I run a small hosting business and I have recently modernised my company website with many new enhancements. My knowledge for web design is purely based around HTML, PHP and CSS although, very little in Javascript. I have managed to load a very simple JQuery Slideshow on to my website. The slideshow I decided to use was: (http://reallysimpleworks.com/slideshow/) - Which is working brilliant on my website. However, at the moment I have a domain name checker that I have inserted in to a div
How do I change the way error messages are presented by the jQuery Validation plugin?
I've chosen to use Jörn Zaefferer jQuery Validation plugin since it seems to be the most robust and easy to integrate, however I'd really like to change the error messages to look like the pop-up boxes used by Mootools and Position Absolute's A jQuery inline form validation, because validation is a mess (I've included image below). Is there a relatively simple way to do this?
How can I wrap selected image with html
Hi people, I have been trying (2 days) to find a way to edit the content of a div containing text and an image. I tried google for javascript methods without any success. Searched also for a jquery method but not getting anywhere. Apologies for being such a dummy over this, maybe it is just outside my ability or maybe I'm too thick. The objective is to add centering to am image which is in a div. An example might help me explain. What I have is this :- <div id="details" contenteditable="true">
JQM, Knockout and Select Lists
All, This is almost certainly something that someone has tripped over. I have a select bound to an array of times. If I pull the list down, I can see the contents, but the the presented "value" for the list is blank (looks like there is no selected). I saw some entries elsewhere that JQM deals with select lists in an unusual way: http://stackoverflow.com/questions/9373982/knockout-and-jquery-mobile-binding-data-to-select-lists .... but whatever these guys are talkng about doesn't appear
How to pass string data from textarea using Jquery ajax as a parameter to a servlet?
I have a text area in html in which a user will paste a long string of data (with spaces) which needs to be entered into the data base. The user will click a button upload which will call a javascript function inside which I am giving a jquery ajax post call in which I need to pass that parameter to the servlet which is mentioned in the url. Following are my codes: <textarea id = "string" rows = "20" cols = "120" > Please enter the data </textarea> <input type = "button" value = "upload" onclick
modifying css of buttons
i have a page of plan selections, and buttons for each plan. there are two per each (one at the bottom, and at the top) for the same plan. I would like a user be able to select one, and the css of that button plan type change, and if they select another one, revert the previous css of the one that was changed, and apply the changes to the newly selected one. would i do something like this?: $('#buttonPlanSelect').each( function( index ) { $(this).addClass('test'); // changes all of the buttons
using script tags to drive data as events into the dom
I was trying to use a script tag at the bottom of the body to retrieve the data from the server for the page. I wanted to drive that data into the page using an event. So that there is decoupling between the javascript that is using the data, and the script tag at the bottom that is producing the data. The script tag at the bottom looks something like: <script type="text/javascript" src="../../api/summary/level"></script> </body> </html> The contents of the script looks like: $(this).trigger("level",
Using jquery to replace flash
Hello, I have a web site to play flash. The flash file is a swf file which was created by images. For some reason I don't want to use swf, I just want to play pictures animation by pure jquery. I am not sure how to start off the journey. Thanks.
jquery textarea keep formatting
Hi, I've loaded a html file to a text area, but it looses the formatting. with iframes it doesn't happen feeding source with html file, but with textarea is not working, and I need to use textareas. Any Ideas? Regards
Automatically assign the height of a website
Heyllo everybody, could you please help me with the currently programmcode, to get automatically the height of my homepeage? I don't need to scroll the website. Thanks. $(document).ready(sizeContent); $(window).resize(sizeContent); function sizeContent() { var newHeight = $("html").height() - $("#header").height() - $("#footer").height() + "px"; $("#content").css("height", newHeight); }
How do you immunize the string when checking with td:contains?
I have a string like this $("td:contains('" + ldName + "')").each(function () { //do something } But when ldName has a value like 'RestoreFactoryState();' it is thinking it as an executable statement (function call) and is trying to execute it. Is there a way we can make this to think it as a plain vanilla string and proceed. I am getting a firefox error message like below Timestamp: 8/3/2012 3:25:20 PM Error: Error: Syntax error, unrecognized expression: td:contains('RestoreFactoryState();')
Accessing the cell and attaching a Jquery tooltip
I am using JqGrid Plugin ( http://www.trirand.com/blog/) to display my data. And for a particular column I need to use Jquery Tooltip ( http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/) to display the data. Now I would need to access the TD of each rows in loadcomplete event and attach a method which can set the tooltip. Using Firebug I am able to find the TD which is generated by the grid. An example <td aria-describedby="list1_projectname" title="Unity in Diversity" style="text-align:left;"
set textarea content with html file
Hi, How to set a textarea content with a html file? Regards
Syntax to timeout message or fade in and out after JQuery validation plugin code
I want to have a message show briefly on the same page (either with timeout or fade in and out) after a contact form is submitted, but I am having trouble applying the syntax to my code (which is based on the JQuery validation plugin sample code, and differs somewhat from the examples I've seen for timeout or fade in out). The code which is used to validate the form, submit the input to sendmessage.php, and display the message sent back is: $(function () { // shorthand for $(document).ready(function()
AJAX and jQuery - How to locate files in a specific folder?
Hi, Since a few days I am into jQuery and I am getting the hang of it with the basics. I have this script here which uses jQuery and AJAX - it makes you switch between pages without leaving the index page the user visits. There were a few problems with the script but I manage to solve these. However, there's one problem left that prevents me from checking if everything works and to make the script run correctly: the script does not correctly locate the .html-files it requires to switch between pages.
Using jquery validate url with IPV6 Addresses
I have a validate rule like this: validateAddress: { required: true, url: true, messages: { required: Global.ResourcesRequired, url: "My Error Message" } } It works fine with IPv4 addresses in the URL, like this: http://10.10.10.10. However if I use an IPv6 address it will say it is not valid. Something like this: http://[2007:dead:c01d:beef:0:5efe:10.8.5.50]/mywebsite. This works if I put it in a browser.
Show pre-load image during images load but all images are different size
I want to display pre-load image center of image's div. But all images have different size so pre-load image can not be displayed in center of each image. Thanks for advance!
Condicionar Validación JQuery Validate en Formulario Dinámico
Cordial Saludo Necesitaba hacer una pequeña consulta, lo que sucede es que estoy validando un formulario dinámico (al cual agrego y quito "bloques" de campos con un botón "Agregar" y "Quitar" los cuales llaman funciones con appenTo y remove) y estoy usando JQuery Validate, más hay un campo que necesito que quede como obligatorio únicamente dependiendo del valor de otro campo (si está vacío ó no), para lo cual he intentado con las siguientes condiciones: Condición 1: "segundoCampo[]": { required:
how convert my custom css to 1.2?
With 1.1 I have a structure css and a custom css made with the theme roller. With 1.2 there seems to be only one css file and there is no theme roller for it currently available. I've tried to get the 1.2 working with my custom theme but I can't seem to get it to work correctly. Any advice on what to do?
Check username availability using jquery in cakephp
Click To View Complete Tutorial When i was working on a project of mine then i was stuck for checking username availability using ajax (jquery) then i tried a lot and after all i got a way around. In this post i will tell you about that how to check whether a user already exists or not with provided username. I have wrote complete code below: Code for your view file. This code is to be placed in your views file: Html Code <label>Username</label>
<?php echo $this->Form->input('username',array('label'=>false,
Bundling all Jquery files
In my asp.net master page, I have around 15 script tags pointing to different JQuery main and plugin files. Is there a way we can bundle all these JS files into a single file so that the amount of downloads can be minimized?
Next Page