jquery fadein for all images, not sure using best implementation of code
Hello. On a custom Wordpress theme I've written, I'm using fadein on all images. It seems to work, but I'm not sure I'm using the best code, and sometimes jitters on load. I'd appreciate if you could give it once over. The production site is here header <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script> footer <script type="text/javascript"> $('img').hide().fadeIn(1000); </script> many thanks for your time, really enjoying learning jquery
Event when I swipe outside text in contenteditable
Hi, I would like to intercept the event when I swipe (drop) text that comes from outside the browser (eg: from text file). This event is not "paste". Is this possible? Do you know this event? TIA
Preventing duplicate transactions in div.
Hi How can I loop thru the #log and prevent duplicates. Can someone please help? $("document").ready(function() { //Update Log div with selected items function log( message ) { $( "<div/>" ).text( message ).appendTo( "#log" ); $( "#log" ).scrollTop( 0 ); } //Read searchphp and pupulate Search Autocomplete $( "#search" ).autocomplete( {
Jquery & dataTransfer
Hello! Who can tell me what's the problem with the code? $("div:[draggable=true]").live("dragstart",function(ev){ ev.dataTransfer.setData("text",this.id); return true; }); the browser show me an error :Uncaught TypeError: Cannot call method 'setData' of undefined thanks!
Regarding MIT license
I asked this question in a post initiated by another user, but no one answered :[ Anyway, if I use jQuery under MIT license in a commercial app, I have to include the copyright notice and the permission notice found in the core jquery file. Where will I include this?
problem with a jquery displaying function
Hello all, Hope this is in the correct forum, apologies if its not. I'm fairly new to jQuery and I've been asked to look at some code which has stopped working. The html / jquery code itself should work as follows. When someone clicks on a heading a table should display to the user, but unfortunately it doesnt. You can see the problem at the following link . Select people and then Mentors or members . Here is where the information should display to the user but unfortunately its not. any pointers
hover problems
so i have around 10 of these boxes with pics in them and i also have a X button in the top right corner. heres the code. <div class="editcar_pics"> <img src="/garage/pics/lambo.jpg" width="175" height="175" > <div id="editcar_hoverpic"> <img src="/garage/pics/x.png" id="editcar_imagedelete" width="25" height="25" /> </div> </div> I want when you hover over the picture the X will appear. But the problem is i have when i hover over any of the classes="editcar_pics" the X will appear on all of the
Having Problem with hover on multiple divs?
Here is my code I don't know why it isn't working. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Robert Eilers - Interview Test</title> <!-- BEGIN: css --> <link rel="stylesheet" type="text/css" href="assets/css/reset.css" /> <link href="assets/css/bootstrap.css" rel="stylesheet"
Uploading File Size Determination Using Jquery
Hi, I want to find the uploading file size using Jquery (Client side). If the selected file size exceeds the maximum limit (assume 1MB) i want to prompt end user with a message to select file with lesser size. Just the file size validation. The actual upload will be handled by form submit button along with other fields. Please help if anyione has answers or suggesting for my query.
Need help with an OOP problem.
I have the following code, calling a method in my main class: some_func:function(){ $.ajax({ url: '/actions.php', success: function(data) { $('#actions').html(data); $('.add_button').click(function(e){ this.add_something(); }); $('.del_button').click(function(e){ this.del_something(); }); } }); }, add_something: function(){
jQuery Accordion Help
I'm currently trying to implement this particular accordion into my site http://jsfiddle.net/8MXAu/ I understand the HTML setup, what i'm having difficutly understanding is how to apply the javascript and scss to my website to make this work. Below is my websites css layout. If you can direct me on how to apply the javascript and scss that would help me out so much! /* --------------------------------------- APOLLO --------------------------------------- by Ryan Clark www.ryanvsclark.com ---------------------------------------
How to move and expand a div?
Hi guys, I was hoping someone could help me, a Jquery beginner, with a problem. I would like to have 4 small "preview" div's on my webpage. Which when you click them will move downward and then expand. I hope to achieve the effect of having small previews on a page which will move to the middle and expand when you click them. Now as I said I'm really quite new to Jquery so I was wondering if anyone could point me in the right direction on how to achieve this? I got asfar as this: <script> $("#div1").click(function(){
Call function with parameters - problem
Having problems executing the function runupdate (line 26) Example page Jquery code call function <script> $(function() { // Function to read #log div function runupdate(personsIDval) { alert('inside runupdate function'); var events = []; var idRE = /^Event ID : (\d+).*$/; $('#log div').each(function() { events.push(idRE.exec($(this).text())[1]); }); $.get('runupd.php',
Using filter() to hide all divs expect for one which should be shown
I have the following code $("#v_posts").click(function(){ $("#general-div").hide(); $("#styles-div").hide(); $("#feeds-div").hide(); $("#misc-div").hide(); $("#pages-div").hide(); $("#posts-div").show(); // $("#right").filter( $("#posts-div") ); }); which i am using to hide some divs and show one div.This works but i would like to compress my code a bit to make my work easier.All the divs are enclosed by a wrapper div with the id right. Currently i am using this to
Trying to figure out a select box issue
I am trying to create a form in which the child fields are disabled or enabled based on whether you chose one or the other. I was able to do it with a checkbox, but i want it to work with the drop down select value. here is the link and the script below: http://www.rfdesignstudio.com/newsite/paypal.html Here is the select script: <select name="type" class="input" id="type" onchange="type()"> <option value="General">General</option> <option value="Walk-a-thon">Walk-a-thon</option>
Superfish full width in Drupal
Hello! Is it possible superfish menu to be automatically resized to full width? I have 1000px width region with 5 menu items. I can manually set .sf-menu.sf-style-default width: 100% and .sf-menu.sf-style-default li, .sf-menu.sf-style-default.sf-navbar width: 20%; But it isn't nice because menu items has text with different length.
Problems with jquery <ul>
Hi people :D I have a doubt. I have a button, where I have an ID CODE <li class='inline btn_fone'> <a href='java script: void(0)' id='$id' class='botao_f efeito_fade'> </a> </li> When I click on this button, it should get this ID and open an <ul>, that is a telephone list, which is called from a database CODE <div id='exibe_fones'> <ul id= '$id_lista' class='lista_fones'> <li class='fone_n'>9999-9999</li> <li class='fone_n'>9999-9999</li> </ul> </div> My jQuery is like
Dynamically added controls not identified by jquery function.
Hi Team, I have a container div within which i have added child controls dynamically during page load. I have a jquery function called on document ready, which does not identify these dynamically added controls. The lenght of children of the container always returns 0. Can anyone please help me with this? Thanks, Goutham
Setting variable in parent document
Hello: How does one set a variable (global) in a parent document? I've tried several methods: parent.window['var_open']=true; window.parent.var_open=true; parent.var_open=true; None of those methods are changing the var_open variable to true. What am I doing wrong? Thanks Much: Pavilion
Problem with .load() callback in a loop
Hello, This is my first time posting, so please forgive any etiquette transgressions. Also I am a beginner/novice jquery user, so please take it easy on me. What I am *attempting* to accomplish is queuing up a bunch of remote pages into a hidden div, with a bunch of sub-divs which contain the actual loaded content. I am loading these pages via the load() function in a for loop. Once the for loop completes a set of icons is displayed which when clicked shows the respective loaded content. Everything
"touchmove" event handler lost on appendTo
Hello, I have found that the "touchmove" event handler ceases to work when you use appendTo, insertBefore or insertAfter on the element after the event handler has been bound to it. Please see the example below. $(function(){ $("<p>Drag this: it works</p>").appendTo("body").on("touchmove", function(e) { alert("Works!") }); $("<p>Drag this: it does not</p>").on("touchmove", function(e) { alert("Why not?") }).appendTo("body"); });
Building Collage using multiple images and saving it as image.
Hi Team, I found many articles on net to build a collage using jquery. But my requirement is to fetch many images, built a collage out of it and save the collage as another image. Is there a way otu to do this either using jquery / server side? Thanks, Goutham
showing and hiding a div
How can I show a div on selecting of one option and hide it on selecting of another option.
problem selecting parent
Hello everyone, I am a newbie studying jquery recently and try to do my website. I am actually reading the jquery cookbook and thought I understood something. But in the practice I do not come along with some simple problems. For example I have these divs in my html: <div id = "menuItem"> <div id="FirstPos" style = "…" onmouseout="fadeinAll();"> <img id="Collection" src="images/COLLECTION.png" onmouseover="fadeoutbutFirst();"> </img> </div> <div id="SecondPos" style
Adding Ellipsis after a number of characters...
Hi there, Im a newby in Jquery, and Im whiling to learn more about it! By now, im having a problem with a text box which I need to show and hide a part of the content, but inserting the Elippsis when the part is hidden! bellow the html and script codes! Any help plz? function toggle_guru(id, anchor) { var b = $(id); if(b.hasClass('guru')) { b.animate({ "height": "210px" }, 500); $(anchor).html('read more'); b.removeClass('guru');
jQuery.getJSON("api/endpoint", ...} results in 404 in Chrome, works in IE
I'm using jQuery.getJSON to interact with a REST endpoint. The endpoint is always relative to the html page from which I'm using jQuery. jQuery.getJSON("api/endpoint", ...} In development: http://computername/dev/api/endpoint http://computername/dev/page.html In production: http://prod.url.com/api/endpoint http://prod.url.com/page.html In the development environment using chrome I receive a 404 - the request according to chrome developer tools is: /api/contactread. Note the / at the beginning. In
jquery to apply css to show only if url is checked
Hi there, I've been asked to apply a change to the background of our website at work. However I need to be able to test it before I put it live and I need to test it on the test site. However if I make a change to css it applies it instantly to live and the test site. This is not good for customers if the background of the website is constantly changing colour and potentially presenting incorrectly. Is there anyway I can set a piece of css to only apply if jquery has checked the url in the browser
animate on page load...
I am trying to animate the overview (a brif descrption) of my shopping basket on a clients website but it doesnt work! In theory sounds dead easy, however, I want that to happen only when the user adds a new product on the basket, so this is what is happening... When the user adds a new product on the basket, the page (which is the product details page) reloads its self and it deosnt take the user to the basket detials page. The user can go to the basket page only if s/he wants to. So what I want
Performance
Hi all, Firstly sorry for my question! This $("input#test") is better than $("#test")? Or has no difference? Thanks..
Problem with Jquery and Jcicle
Hi Guys I'am problem with code below $(document).ready(function(){ $('#right').load('http://dilingerie.com.br/slide'); //---------------------------- $('#menu li a').click(function(){ link = $(this).attr('href') $.ajax({ url : link, beforeSend: function(){ $('#right').hide('slow') $('#carregando').show('fade') }, complete: function(){ $('#carregando').hide('slow') $('#right').show('slow') }, success: function(retorno){ $('#right').html(retorno)
Form submission dosn't work after self-destruction of child
Browser: firefox 14.0.1 In simple test below if you press button "test1", then button "test2" will not work. In Google Chrome it's ok. <html> <head> <script type='text/javascript' src='/js/jquery-1.5.2.min.js'></script> </head> <body> <? echo $_POST[test]; ?> <form action='test.php' id='form' method='post'> <input name='test' type='text' value='testval'> <button onclick='$(this).remove(); return false;'>test1</button> <input type='submit' > </form> <button onclick='$("#form").submit();'>test2</button>
Why does Ajax data send single integer as array?
I'm sure this question has been answered many times in the >5000 posts found with "ajax data", so I apologize for repetition, but at least this should have a simple answer. If I write $.ajax({ ..., data: {id: id}, ...}) then I get a query string like ...?id[]=147 rather than ?id=147. Why is this array form used? According to the docs, the params function is used to convert the data if a key-value pair string is not provided, but $.params({id: id}) returns "id=147", not "id[]=147". What is going
Question about a data object for jquery each method...
Is it possible to store a function into a data object for the jquery each method like this... $.each([ {keypress: 65, mcall: x()-player.speed}, .... .... .... ], function(i, obj) { //Do something with keypress and mcall }); I'm learning to put strings and numbers for the value of mcall, but I have a situation where I need to place a custom function x() minus a javascript object player.speed. Is that ok for mcall or is there another way to write this? Thanks!
inserting div content into another div class
Hi, do the needful. here is my code <div class="clsName"> <div class="innerClsName">one</div> </div> <div class="clsName"> <div class="innerClsName">two</div> </div> <!---Add Div here--> <div class="clsName"> <div class="innerClsName">three</div> </div> <div class="clsName"> <div class="innerClsName">four</div> </div> <div class="clsName"> <div class="innerClsName">five</div> </div> </div> i want to insert any one of the innerclass(innerClsName) content
Showing text with specific font
Hello, I load some htm file using jquery Load method into div section. the text in htm has a specific font. When clients are showing these html I'm not sure they will see the text with the font which is only installed in my system. I don't know how to show text on client machine with the desired font, help please.
Find and remove all occurences of class .selected
Supposing i have 3 divs.Div1,div2,div3.Once any div is clicked,i add the class selected to that div.In my example,once another div is clicked,i remove all the class selected from all my divs,even those that do not have selected and add class selected to the clicked div.So far i have this. $('div .kontainer').find('.selected').removeClass('selected');Is this the right approach?.
Disable # Anchors?
I have some jQuery UI tabs, controlled by # anchors. You click a tab and it opens instantly, but if you want to open 'tab 2' by default you would link to "domain.com/directory/#tab2" The problem is, each tab has a list of data with pagination. A page link example would be "domain.com/directory/?page=3#tab2" This will open page 3 on tab 2, but the page jumps down, when I'd like it to stay at the top of the page. How would I go about doing this? Thanks.
How do I trap and void ESC (CHR 27) keypress on my webpage?
I would like to trap and void ESC keypress by the following code: //Block ESCAPE Keys $(document).keydown(function (e) { if (e.keyCode == 27) return false; }); It does not seem to do anything. Also can some guide me if I void ESC keys this way, would Jquery dialogs which use CLOSEONESCAPE be affected? I want them not to be disturbed by this trap and dragnet that I want to set for ESCape key.
jQuery - Infinite scrolling
I'm trying to implement infinite scrolling on my page, how ever something has messed up, instead of triggering at the bottom of the page it's triggering when I scroll back to the top. Does anyone know what could be triggering this? $(window).scroll(function() { if($(window).scrollTop() == $(document).height() - $(window).height()) { alert("hello"); } }); I'm currently using the code above, which works in jsfiddle just fine. I also tried an alternative of - if($(window).scrollTop()
Change plugin-vars "onBeforeInit"
Hi, developed my own Image-Carousel which automatic resizes, when the window is resized or in my case when the orientation of a mobile device is changed. Now I want to change to number of displayed slides in Landscape-View, but i dont know how to change my "Setting"-Vars in my Plugin-Call Here is the basic Code of my Plugin: (function($){ $.fn.didiCarousel = function(settings) { var defaults = { displaySlideQty : 2, moveSlideQty :
Next Page