JQuery :: Finding Img,canvas Wrapped Around A Tags
Oct 25, 2011
I have the following code which displays a list of 6 images. Im using a reflective and magnifine plugin which seem to be working to an extent. The last three images in the list work perfectly, however the first three dont magnify, and that is becuase I have the img tags wrapped around the a tags as they are links. How to modify the magnify code so it magnifies imgs that have the a tag around it.
Basically, I'm looking for a way to find a list element that has a ul child, and then hide or show that ul. What I have here doesn't seem to be working.
I'm trying to select a line a text and format it, only problem is there are no tags around it other than a closing </p> tag and a <br /> tag after it. Please see below the line in bold text which I'm trying to surround with <h3></h3> tags. [code]...
I want to find a way of using canvas tags that are created at runtime. I went about this by trying to change the id of the tag, ONLY to find out that javascript did not like the fact that I was using numbers, even though I converted to String first... var count = 0; for (var item=0; item<20; item ++) { if (count%5==0){ document.write(" ||| "); } var canv = document.createElement("canvas"); canv.setAttribute('width',300); canv.setAttribute('height',300);
num = 505; aStr = num.toString(); // does NOT do the job for some reason !!!??? aStr = 'canvas'; // this works... canv.setAttribute('id',aStr); document.body.appendChild(canv); count += 1; } var C = document.getElementById(canv.getAttribute('id')); if (C.getContext) { makePlot(C); // does the plot to the canvas }
I want to delete some lines on the canvas that i have created in HTML5 (with the <canvas> tag). I know one solution and that is using clearRect() (give this function the HEIGHT and WIDTH of the canvas and you clears the whole canvas.).But i don't want to clear the whole canvas, i only want to delete a few lines made by the function lineTo().
I have a menu in which is applied typeface script. Typeface 0.11 version doesn't support hover on links. There is an experimental version but doesn't work very well for me, so i tried to implement hover by myself. Problem is: hover works pretty well changing canvas context property fillColor and then calling fill(), but the stroke on hovered voice remains on another color. Difficult to explain, so i put some test code online: TEST CODE As you can see, passing with mouse on the menu voices triggers the hover and the element change, but remains bordered in red.
I am selecting a group of li elements. The following code returns me a length of '8'
$('.HwCitationsContent li').length
However when I try to get the text from a particular item in the set I get nothing. In fact, the msg box won't even appear. alert($('.HwCitationsContent li')[1].text())
I need to return a wrapped-set by filtering another wrapped set, however the filter is based on creating a Range object from each of the items in the first wrapped set.[code]...
Can't seem to make it work, I have seen many examples but they are all just for 1 div tag. When i trymore than one it doesn't work anymore.The first one works, if i have more than 1 then the other don't work.
using the following jquery $(document).ready(function(){ $("#toggle-text").click(function () { var divvalue= this.value;
I'm trying to find a script that will scroll text past fixed position sandbag divs.
I want the text to flow around an image as it scrolls.
It's easy to do the wrap around the image part. I can't seem to find anything that will continue wrapping the content of your site around the fixed background as you scroll though.
I am working with the new canvas element. I have simplified my request.
Can I add a class to the canvas JS? Currently the fill colour is set with 'context.fillStyle="red";' I would love have this in a class as I want to change the colour of the fill with jQuery.
<!DOCTYPE html><html><head><meta charset=utf-8"><title>Canvas</title></head><body> <canvas id="myCanvas"></canvas> <script type="text/javascript"> var canvas=document.getElementById('myCanvas');
A remotely shared white board, using regular JavaScript,jQuery, the canvas element and PHP.I (or someone else) can get this thing working.The new 8:25 a.m. (US CST) version in http:[url].... should work -- though I still have not seen it work, perhaps.
I am having problems getting the webshims plugin canvas polyfill to work. I get the following error in IE9 using IE7 mode: SCRIPT438: Object doesn't support property or method 'fillRect' problem.html, line 21 character 7 when I try to run this code:
Is it possible to trigger the action of a form with a submit button that's outside the form tags? If so, how should this example be rescripted to make the input tag work outside the form tags?
Title doesn't really give this thread justice ... I have a content div with an image and text included into it. This same div class is being used multiple times. What I want is to be able to click the image, and have the <p> in that div toggle to show or hide. Here is the XHTML code for the front-end:
<div class="content"> <img src="image_big.gif" alt="image" class="toggle_font" /> <p> Caption for the next image. </p>
I am trying to catch keypresses in my canvas tag, but it appears that that is not valid.
I may try to just create a hidden input box that will allow me to catch keypresses.
I am trying to write a very simple asteroids game for a presentation on Ajax in July, to show that javascript can do more than it was able to a couple of years ago.
I'm writing a script that graphs data in different colors and shapes and I'm encountering two problems:(1) I can't specify different colors for the graph I'm rendering. If I use fillStyle="red"; then the entire chart becomes red. It seems to use the last color specified as the color for everything on the chart.(2) The shapes are overlapping in strange ways. The fills are not covering the lines of shapes behind them so it's unclear which shape is in front and which is behind. It's like they aren't being treated as separate shapes but instead one shape where boundaries are unclear. I don't know how else to explain it.
I have make a javascript program that uses HTML canvas and I can't get it to work in Internet Explorer. I tried using excanvas and jqcanvas but had trouble getting them to work.
I have a link styled with css that I'd like to change with a mouse event. It's going to be on a touch screen so I'm assuming I should adopta mouseUp/mouseDown model?
i am creating a simple dynamic menu for my study with the following structure:
[Code]...
now i need to find the correct selector for the mouseout event, because now the submenu disappears if i am getting of the current element (this) of the mainmenu, but i only want it to disappear if it is not anymore over the submenu, or if the mouse goes over another element of the main menu.