Question about $(this).data
I'm making color swatches to click on to change the color of a piece of text. A swatch looks like this: <div class="Color" data-color="IndianRed"></div>When the swatch is clicked, a selected div gets its text colored "IndianRed" by this code: $('.Color').click(function(ChangeColor){ $('.selected').css('color', $(this).data('color')) }); which works nicely. Now I thought it would be nice to set the background-color of the swatches when the page loads in a similar way, and you don't have to add something
New to jQuery and Have a Problem
I'm working on reviving a project and currently the project uses jQuery 1.6.2 and works fine with it however as part of the revival, it needs to be upgraded so we can take advantage of newer technologies, etc. When I replace jQuery 1.6.2 with 1.9.1, the script fails to load any data and returns this error in Firebug Error: Syntax error, unrecognized expression: a[href="#home"], On the HTML page, I have this code currently: jQuery(document).ready(function() { function request(page) { jQuery('#content').html('<h2
How do I add controls to slideshow?
Hi, I'm trying to redesign the homepage of our website and have set up a duplicate homepage to test on which you can view here: http://baseballsoftballuk.com/homepagetestfortconly/ The slideshow is already there, I believe using JQuery Cycle but I want to add buttons so you can jump to a slide rather than have to wait for it to come around again. I've seen the 'pager' option here: http://jquery.malsup.com/cycle/pager.html and I'd like to add something similar to our slideshow but I can figure out
Dialog box close after click is made
hi guys,... can anyone help please,.... I have a dialog box open to set photo as profile avatar picture,... how can I close dialog box after click is made? thanks in advance,... <script type="text/javascript"> $(document).ready(function() { $('#profile_picture_dialog_<?php echo $profile['User']['id'] ?> a').each(function() { var $link = $(this); var $dialog = $('<div></div>') .load($link.attr('href')) .dialog({ autoOpen: false, width: 500, modal: true, title: 'Set Profile Picture' }); $link.click(function()
can't get page-content full width 100%
Just like the topic says...I've searched and searched and can't figure out how. I have have a ui-grid and setting it to width 100% stretches it all the way to the right BUT there is still a margin on the left and I can't get rid of it! I tried setting inline css to margin: 0 and margin: 0 auto; and nothing works. What can I use to take up that margin space??? <meta name="viewport" content="target-densitydpi=device-dpi, height=device-height, width=device-width, user-scalable=no, initial-scale=1,
odd coding
Can anyone tell me what the following code does? I'm fairly new to Jquery and have trolled the internet and tutorials but with little success :- $(this).children('table.grid').each(function(table_index) { $(this).find('tbody tr').dblclick(function(dblclick_event) { $('td.link a', this)[0].click(); }); }); Any help greatly appreciated
insert the loading spinner with .getJson
So that's what I'm trying to do...insert a spinner and hide it when the page content is loaded but it's not working. Here's what I have: $('#mainNews').on('pageinit', function(event) { $.mobile.showPageLoadingMsg(); getNews(); }); function getNews() { $.getJSON('file.php', function(data) { $.each(data, function (i, u){ append-to-listview; } $('').listview('refresh'); $.mobile.hidePageLoadingMsg(); }); }This seems simple but I can't
Vertical Scrolling text
I am a rank newbie to programming beyond basic shell scripting, so if I ask what appear to be stupid questions, please forgive me. I'm trying to create a page that will have several - probably a dozen - bullet points that are on a slow vertical scroll. Ideally the page viewers (consumers of the data) would be able to click on an item and drag the scroll - when I see an interesting item I could click and hold on it to stop the scrolling/drag it to move the list either up or down, then release it
help please got in a tangle
[CODE] It appears that the function(s) aren;t being fired What I want to happen is for the nav-indicator to smoothly animate to the position of the selected menu item <script type="text/javascript"> $(document).ready(function() { $('#nav').append('<img src="/media/images/base/nav-indicator.png" id="nav-indicator" alt="indicator"/>'); $('.slow-scroll').click(function() { alert("SL SC TRIGGERED"); if ($(this).parents('#nav').length > 0) { setNavIndicatorPosition($(this));
Tooltip Plugin. Allmost there ...
Hello, I have a problem on my tooltip plugin: http://jsfiddle.net/mdmoura/RPUX6/ When I move the mouse faster between elements (1 and 2) the tooltip does not show. I think this happens because I have a delay on element mouse leave: $this.mouseleave(function (e) { tooltip.timer = setTimeout(function () { $("." + options.class).detach(); }, !options.mouse || options.static ? options.delay || 0 : 0); }), // Mouse leave I have it to allow the mouse to move over the tooltip for when
images flying
Hello. I need to create a little animation of images flying away from the viewer (image attached). Can anyone suggest which plugin will do that? Thanks! Ron
arrange images
Hy There are probably a lot of questions like this, but I couldn't find an appropriate answer anywhere. I want to make a site with a grid of images which can be arrange by date and kind. But! I just want them to arrange and no images should disappear! Can anyone just give me a hint where to find a suitable plugin or sth like that. Thanks a lot
Do I need to learn JQuery before leaning JQueryMobile ?
Do I need to learn Jquery before leaning JQueryMobile ? Can somebody point me to JQuery eclipse plugin ? or witch eclipse version is better to use for JQuery ? I am interested in JQueryMobile. so Eclipse JQueryMobile plugin ? if anything like exist. Tks
jQuery Cycle Plugin from http://www.malsup.com/
hi there, 1st of all thanks for this wonderful plugin that i use mostly in my web development .... 2nd, am building this site and am using this plugin to slide a normal div with <h2> and <p> now everything is perfect at the same time the design have a background image for the site so i attached it to the body and with little tweeks a made it to take full width, untill now everything is perfect. when testing cross browser, specially on ie8 i noticed that this plugin render a white background insted
Help me to start with jqueryMobile please
I am new to jqueryMobile. I haven't done nothing on it and want to start. Can I use eclipse ? any plugin ? or Netbeans ? any good example that help to start ? tks
How do I get JQuery to work?
I am new to JQuery and I am trying to figure out how to get my .mouseenter() and .mouseleave() methods to work. So far I have tried using IE8 and FF, but for some strange reason I can not get my elements to do anything other than remaining static. Here's the code that I have so far: HTML: <!Doctype html> <html> <head> <link type="text/css" rel="stylesheet" href="style.css"/> <script type="text/javascript" src="file:///D:/Documents%20and%20Settings/stsc/My%20Documents/_prac/script.js"></script> <title>Practice</title>
jqTree question
Hi! I'm just fumbling along trying to make sense of jQTree by mbraak. There s an example page on github which I am trying to follow. (http://mbraak.github.io/jqTree/ ) I copyied and pasted the code in the header: (I'm sorry I can't figure out this ******* Editor! ******************************************************************************** CODE: <meta charset="utf-8"> <title>jqTree</title> <link rel="stylesheet" href="extra/css/gridless.css"> <link rel="stylesheet" href="extra/prism/prism.css">
animate object to defined location
hi all, this code moves otherobject 40 less, 100 more but I want to specific location like to top:'40px' and left:'100px'. How can I do this? $("div#myobject").on("click",function(){ $("div#otherobject").animate({ top: '-=40', left:'+=100' }, 1500, function() { }); });
How do I add/remove class on button click?
I'm sure these are some absolute beginner questions but I just dont know how. Question 1: I have a button on my page, lets just pretend this is it: <div class="navappear">Open Navigation</div> When you click that button, I want it to remove the "hidden" class or add it, depending on which state it is in. <div id="extranav" class="hidden"></div> How do I do this? Question 2: If I also have another div, lets say: <div id="background" class="nav-open"></div> Can I have that same button also change the
How do I refresh 6 divs at same time
Sort of a related problem to my other post I have soem jquery code below that is triggerd by an href <a id="refreshall" href="#refreshall" class="lnk"><img src="../images/refresh.gif" border="0"></a> $(document).ready(function() { $("#refreshall").click(function(evt) { $("#d1").fadeOut("slow").load("./scores.php?tblNumber=2").fadeIn("slow"); $("#d2").fadeOut("slow").load("./scores.php?tblNumber=3").fadeIn("slow"); $("#d3").fadeOut("slow").load("./scores.php?tblNumber=4").fadeIn("slow");
Widely suffered problem
when 2 jquery used effects are used on same page with different versions. why would they stop working, instead they both are working separatedly. i used "no conflict" function but one of it works only and the other stops. if i want to play both the effects. there must be some solutions by jquery experts. much big part of technical web industry is causing problem because of this issue. it is for better future of jquery to solve this issue. i am really appreciating the efforts of the jquery builders
How to set a default CSS state for jQuery Effects???
Okay, this is probably pretty simple ...and I apologize if this is answered already elsewhere ...or if this is obvious to others, but i can't seem to find it documented anywhere or shown as an example. When using such effects as .slideDown(), or fadeIn(), etc. how does one set the default state for an element so that its not initially shown? Via CSS? If so, what property? Is the only way to do this by calling slideUp() on the element first???? That seems inefficient.
Change image src using input type hidden value
I am trying to replace the src in my img with the value in my hidden field and it does nothing. I am displaying products and have to change the src value to match the current product displayed. Here is the javascript I am using in the html header: var img = new Image(); $(img).load( function () { $('#prdimg').attr('src', img.src); }); img.src = $('#imgpath').val(); Here are the div elements I am using in html: <div id='divDetail' > <input id="imgpath" name="imgpath" type="hidden"
Using Jquery with DOJO Toolkit, netbeans and JSP
Hello, I have been using DOJO Toolkit with JSP on the server running GlassFish Server. Now I want to use JQuery Mobile. My questions are: 1) Can JQuery mobile be incorporated with JSPs (as far as i know, DOJO toolkit also uses it... please Confirm) 2) I have used CSS to enable pages to be automatically configured according to target (Screen or Printer) and i have designed pages that print differently from displayed using CSS. Now i want to design the page so it adjust itself according to screen
fancybox gallery with image rollover
I am building an image gallery with jquery fancybox to show before and after photo-retouching. I would like to add an image rollover effect to the large image in the fancybox overlay using the script below. When I apply the class="rollover" to the <a> tag the rollover script breaks. The script works fine when I apply the class"rollover" to the <img> tag. However this places a rollover effect on the gallery thumbnail. Can someone point me how to achieve this rollover effect on the large image
Trying to display php generated table in a DIV and have it refresh on an interval as well as having a refresh button/href
Ok I would like the 6 div tags to display data (all formatted as tables via a php page) 1-So when you get to the page the 6 div tags have data 2-Have the Div tags refresh every 30 seconds 3-Have a refresh button/link so that the DIV can be refreshed any time here is what I have so far any how I can get those 2 things above accomplished? <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $.ajaxSetup({
Quicksand filter clashing with dropdown code
I'm relatively new to this and have had no problem editing an customising filters in the past but I can't get these two to work together. I have a hoverover dropdown menu and I also need a filter on the same page. The two don't work together until I have clicked on a filter then they both work as normal. Until then the website is misaligned and not working. Does anyone know how to get them to both work from the start? This is the problem page: http://clinell.com/design/carell/test/portfolio.html
Problem with local css
Hi, i have a problem using my local jquery.mobile-1.3.1.css; icons are not displayed correctly, however when I use the version onlne i can see them. Does anyone know who may be happening?
All site is loaded when I click to load only Iframe.
Hi. In my fallow code, when I try to load the iframe all site is load. </head> <body onLoad="loadFrameInit()"> <script> function loadFrameInit(){ $("#IframeMaster").attr('src','Modelos/Mcs/mcs.html').load(function(){ alert("1"); }) } </script> <div id="MenuModelos"> <img src="img/menuBTN.png" id="ImgMenuModelos" title="Selecione outros modelos" onClick="AbreMenuModel()"></img> <div id="AreaModels"> <img src="img/buttonBody.png" class="ponteiro" onClick="AbreMenuModel('Modelos/SuperRacer/superRacer.html')"></img>
Grid of Buttons
I'm trying to use a 2 column 3 row grid to create a home page. The standard grid blocks dont behave like buttons and changing the elements to buttons looks really ugly. Does anyone know how I can make the grid blocks animate like a button?
jquery loop
I want to loop here i have 60 div with ID s #draggable1, draggable2, draggable3 : if ($('#justgarph > p:contains("draggable1")').length > 0) { $("#draggable1").addClass('current') $(".product:not(.current)").animate({ "top": "0", "left": "0" }, 500).delay(100); $("#draggable1").animate({ "top": "-300px", "left": "200px" }, 500); setTimeout(function() { $("#draggable1").animate({ "top": "-106px",
JQuery Automatic Scrolling --> Need help
Hello, My name is Marcel and I need your help. My code automatic creating a list by all <h1> tags in my html file. Now i want to scroll to my <h1> tags when im clicking the specific element in my list. But i dont know how to do this. Maybe you guys have a hint for me how to do this or maybe can create me the code so i can look at it and realize how this is working? Thx! $(document).ready(function(){ $('h1').each(function( index ) { console.log( index + ": " + $(this).text() ); $(".Sammlung > ul").append("<li>"
Update cells in table
Hi, Here is my code: http://jsfiddle.net/wLm2A/ The problem is when you click on Edit the whole table messes up, displaying multiple texfields and dropdowns. I'm trying to get it to display one textfield with the cell's content within in for the Email column and a dropdown with the cell's content in it for the Presenter and Engineer column. I know i'm nearly there just can't see how to do this. Thanks.
how to send jquery values to PHP
Hi, i have found a slider, it have a method to fire the changed values: $("#slider").bind("valuesChanged", function(e, data){ console.log("Values just changed. min: " + data.values.min + " max: " + data.values.max); }); But how can i use it in my PHP script? The slider works, but i need the values in my PHP script. best regards Torsten
View inserted html elements content inside a div, smaller
Hi there. It's great that I can even ask questions like these, on a forum like this and I would like to say thank you. Within the html page: making a preview in a div box, of html pages elsewhere in the site. How do I size the content of the injected html elements, to be proportionately smaller, and fit inside the box to view. This is for a financial transaction site. So typically end users want to preview statements in tables and image graphs before they generate the final pdf. I know that as a
Autocomplete (jqueryui) working only in Chrome
Hi - I'm quite new to both js and jQuery, but so far I've been excited by how easy it is to accomplish difficult tasks. However it's full stop now. I have an autocomplete function that works excellent in Chrome. I have to make it work in IE9 as well, and I can't figure out what is wrong. A request like: http://nrkdt58617/sn/api/suggestions/Makhatsj from the autocomplete function will return json. I'm enclosing both my code and a sample json response. In advance, thanks a lot for any help,
emergency: how to get the value ?
Hi, I am pretty new with jQuery and i am building a 3 reel slots machine. I have got the animation working but now i can't get the value of the reels to determine wheter or not the person has win i am trying to get the value off the div by the top offset var k = document.getElementById("slots1").offsetTop("200").value ; here is my js : // JavaScript Document //note parseInt //note stop //var opts = ['cherie', 'banana', 'star', 'seven,' 'bar', 'hclogo', 'cslogo']; var slot = ['cherie','banana','star','seven','bar','hclogo','cslogo','cerie','banana','star',
Syntax Question(s)
I've done some developing with Jquery and so am not uncomfortable in using it. Unfortunately I'm not familiar with all of the syntax of javascript/jquery (especially more advanced features) and I want to figure out what some code is doing. Here's the code that I'm uncertain about: (function(window, $, PhotoSwipe) { $(document).ready(function() { var options = {}; $("#Gallery a").photoSwipe(options); } ); } (window, window.jQuery,
Please Help
Hello, I know nothing about Jquery but am going to take an online course. But right now I have an issue where 2 jquery scripts don't work together. I can change the 1st library to 1.9 and it works but not with the 2nd call for it and I don't know how to solve it. How can this section of code be written so both call for 1.9 and work together? <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/libs/jquery-1.3.0.min.js">\x3C/script>')</script>
pulling data using ajax
i want to pull some contents from a website .... how can i do that?
Next Page