JQuery :: Diagonal And Vertical Text Selection

May 2, 2011

Is there anything out there that allows for a diagonal and vertical text capture in javascript or jQuery? I was not successful in finding anything. I have a game similar to word find that I've developed, but I need to be able to capture text vertically and diagonally. Otherwise, the only solution will be for me to do a by-click basis to capture items on the screen. I found the script below which handles horizontal capturing:

<script type="text/javascript">
document.body.style.cursor="url(3DArrow.cur), crosshair" ;
if (!window.Kolich){
Kolich = {};
} Kolich.Selector = {};
Kolich.Selector.getSelected = function(){
var t = '';
if (window.getSelection){
t = window.getSelection();
}else if(document.getSelection){
t = document.getSelection();
}else if(document.selection){
t = document.selection.createRange().text;
}return t;
}Kolich.Selector.mouseup = function(){
var st = Kolich.Selector.getSelected();
sel_text=st.replace(/s/gi,"");
if(st!=''){
alert("You selected:"+sel_text);
}}
$(document).ready(function(){
$(document).bind("mouseup", Kolich.Selector.mouseup);});
</script>

View 8 Replies


ADVERTISEMENT

JQuery :: Show But Effect Moves Down Instead Of Diagonal?

Jun 7, 2010

I've got a div with a border around it. I'm using toggle so that when you click on a hyperlink on the page, it toggles and shows that div. When that div renders with the show, the border is painted diagonally when it starts to render to the page.

Is it possible to make that render action somehow render up and down or even a different type of effect? I do not like how the border panes diagonally when that div is shown.

I can't find anything yet in the jQuery docs that would allow this. Maybe I just overlooked it?

View 1 Replies View Related

JQuery :: Text Scroller Vertical Within Fix Sized DIV

Jun 4, 2009

I am after a simple div scroller that scrolls text up/down within a fix sized div, with two scroll buttons that can be set to hover/click, I have found a load that use it for <li> tags or images and scrolls only up by set amount, but I would like this for text etc.

View 6 Replies View Related

JQuery :: Flipv Vertical Text And Extra Space

Sep 13, 2009

I'm currently using the Jquery Flipv plugin, which works well. The only problem is, some words have extra padding at the end, depending on how many characters.

I'm not sure why this is, but it seems that the conversion to vertical text creates some extra spacing on certain browsers.

View 2 Replies View Related

JQuery :: Ann: JqPlot 0.6.2 Released - Features - Rotated Axis Text - Vertical And Horizontal Bar Charts

Jun 1, 2009

jqPlot is an open source plotting plugin for jQuery. The 0.6.2 release adds many new features including:
Rotated axis text. Vertical and horizontal bar charts. Automatic trend line computation. Data point highlighting. Cursor tooltips showing data and grid position. And many other features.

The jqPlot homepage is at [url]

The downloads page is at [url]

The mailing list/Google group is at [url]

jqPlot is built from the ground up as an extensible and plugable plugin. Handling of data, drawing of plot elements, events, virtually everything is handled by a plugin. This means you can enhance or swap out core functionality without touching the core code.

View 1 Replies View Related

Vertical Align A Paragraph Of Text?

Jul 27, 2006

it is possible to align a paragraph of text so it is placed in the middle of any browser window, using only html and css. Can this be done without js? If not, how much javascript will I need to know in order to do that?

View 3 Replies View Related

Simple Text Scroller (Vertical Or Horizontal)?

Nov 29, 2009

I need to make a very simple text scroller (either vertical or horizontal) using JavaScript.

View 3 Replies View Related

Code For A Vertical Slider - Scroll Text On A Page

Sep 27, 2011

I was wondering if there is a javaScript code for a vertical slider. Basically, I'm presenting a menu, that needs to fit in a certain amount of space and it is much taller than the space allotted.

I was going to use an iframe, but I thought that there might be some JavaScript I could use that would be more elegant. I just need to scroll text on a page.

View 10 Replies View Related

Create Vertical Scrolling Text Unlimited Loop?

Jan 12, 2011

<html>
<body>
<script language="JavaScript1.2">
//change 1 to another value to alter the scroll speed. Greater is faster

[Code]....

View 1 Replies View Related

JQuery :: Clear Selection Of Text On Ul Element

Sep 18, 2009

I am trying to get/set only text of list only element text value. But for some reason I can not select it in clear way. List something like:

<ul>
<li id="myid"> Here text that I want to modify
<ul>
<li id="dfdf">i don't want modify this</li>
<li id="dfdf">i don't want modify this</li>
[Code]...

View 1 Replies View Related

JQuery :: Prevent Text Selection In Button?

Apr 15, 2010

If you have an anchor and apply the button widget, text selection in the button is still possible.

View 1 Replies View Related

Way To Prevent Tab Text Highlight / Disable Tab Text Selection

Apr 21, 2011

Here's a sample form:

Code:
<form action="#" method="post">
Name:<br />

[code]...

View 3 Replies View Related

Prevent Tab Text Highlight / Disable Tab Text Selection?

Apr 21, 2011

Here's a sample form:

Code:
<form action="#" method="post">
Name:<br />
<input type="text" name="name" value="your name" /><br />

[Code].....

When you tab to a text input, the value gets highlighted. How can it be disabled?

View 7 Replies View Related

Possible To Prevent Tab Text Highlight / Disable Tab Text Selection?

Apr 21, 2011

Here's a sample form:

<form action="#" method="post">
Name:<br />
<input type="text" name="name" value="your name" /><br />

[code]....

View 1 Replies View Related

JQuery :: Raise Event On Certain Text Selection In Html Page?

Mar 11, 2011

suppose i have a html page with text, links and what ever else a page contains. On selection of Text on the html page i want to raise some event that will do something. But what that event is known as? By text selection i mean placing mouse pointer to some text and left clicking and moving the mouse either to left or right. Now when user selects some portion of text and releases the mouse's left click button a event should be raised. Obviously that event should know what was the selected text. So is it possible ?

View 1 Replies View Related

Add Text To Current Selection

May 14, 2009

I have a function that will add text to the end of my text box. I want to be able to have the text added where it is currently selected.

My current code is :

View 1 Replies View Related

Wrapping A Selection With Text?

Jun 11, 2011

I am working on code to wrap BBCodes around a user selection, then leave the selection selected for possibly adding more BBCodes around the same selection.My problem is that there seems to be several different ways to do it and I can't figure out which one is "the best".Now, I can't use the "standard" way of doing this because I am working with TinyMCE. I know there are countless examples on how to do this with textareas... that is NOT what I need.TinyMCE can give me a selection RANGE, a selection NODE or a selection OBJECT. Note that if I use TinyMCE's range, it internally "normalizes" the range to be a standard W3C range, regardless of browser.I've created a new range, extracted the selection from the user's range, created elements for the open and close BBCode, inserted the elements into the range and finally set the user's selection to the new range. Works fine.

I also tried taking the selection node (which is an element), then simply used "innerHTML" to add the opening and closing tags, then set the node to the modified node. Works fine.I've also used the editor's built in "selection.getContent()" and "selection.setContent()" calls and THIS also works.I've even tried using the DOM "surroundContents()" function, then used a regex to change the < and > into [ and ]. Freaky... but that works too.So, my dilemma is... which method should I use???To recap, here's what I want (blue represents selected text):

This is a test sentence. (user selected some text)
This is a test sentence. (text is wrapped and remains selected).
This is a test sentence. (user clicked another bbcode button).

[code]....

View 6 Replies View Related

Get The Selection Of A Text With The Function?

Mar 27, 2010

im trying to get the selection of a text with the javascript function : window.getSelection();.

The problem is that the result is not like i hope. For example with a structure like this:

<div class="one" id="one">
Im one div
<strong class="two" id="two"> this is strong </strong>
Rest of div

[Code]....

View 1 Replies View Related

Get Text Selection In FireFox/Mozilla?

Sep 25, 2005

Can anyone give me a Javascript snippet that will get the currently selected
text in a TEXTAREA element? The code I have only works in IE.

View 1 Replies View Related

Unwanted Text Selection In MSIE?

Oct 13, 2011

I made up a little test program to grab the mouse X and Y coordinates and plan to use it to allow users to resize a window.

Anyway, the problem I'm having is that in MSIE-8, the mouse down and movement causes text to be selected (which I don't want).

Here's is a screenshot from MSIE:

[URL]

And here is the test program live online: [URL]

Notice that the text in the box is selected... I don't want that to happen.

Of course, it works just fine in Firefox, but not MSIE.

View 4 Replies View Related

Display Text From Checkbox Selection?

Sep 25, 2010

Is there a way to display text from selecting checkboxes such that different combinations have different texts?

View 2 Replies View Related

Disable Text Selection And Print Key In IE7

Feb 21, 2007

I'm trying to disable the text selection and print-key functions on a couple page of my web site using the code below:

View 4 Replies View Related

Set Selection On Input Type=text In Ie?

Nov 12, 2010

I want to set selection on HTML input type=text.

Here's the code for FF and Chrome:

<input type=text value="01234567890" id=1>
<input type=submit onClick="selectIt()" >
<script>
selectIt=function (){

[Code].....

View 2 Replies View Related

Menu Selection Populates Text Field

May 1, 2009

I have the following code I picked up which tries to fill in a text field with data depending on a user's menu item selection. I place this code in the header:

Code:
var colors = new Array();
colors["apple"] = "red";
colors["grape"] = "purple";
colors["milk"] = "white";
colors["cheese"] = "yellow";
colors["chicken"] = "white";
colors["beef"] = "red"; .....

var groups = new Array();
groups["apple"] = "fruit";
groups["grape"] = "fruit";
groups["milk"] = "diary";
groups["cheese"] = "diary";
groups["chicken"] = "meat";
groups["beef"] = "meat";

function printColorAndGroup(){
var value = document.getElementByName('food').options[document.getElementByName('food').selectedIndex].value;
document.getElementByName('food_group').value = groups[text];
document.getElementByName('food_color').value = colors[text];
}

I then use the following html in the body:
Code:
Food:
<select name="food" onchange="printColorAndGroup()">
<option>apple</option>
<option>grape</option>
<option>milk</option>
<option>cheese</option>
<option>chicken</option>
<option>beef</option>
</select>

Group:
<input type="text" name="food_group">
Color:
<input type="text" name="food_color">
But when I run this nothing happens...
Here's the page [URL]. None of the code above is colored... looks like I'm using the wrong tags here. Which tags should I use to post this stuff correctly?

View 12 Replies View Related

Can't Stop Text Selection When Dragging Object

Jun 16, 2009

I have 2 example/test pages of the issue I'm experiencing. For now, I'm just trying to get it to work in a standards-compliant browser, so view in something other than ie:

[URL]

If you click and drag the orange bar up or down, it works fine on the first page. However, on the 2nd page, if you click the orange bar and drag down too fast, it starts selecting text and then the bar gets all wacky.

My suspicion is that the bar gets messed up because the text is being selected. That occurs because if you scroll too fast, the cursor goes off the orange slider bar and starts selecting. If you scroll very slowly so that the cursor doesn't go off the bar it seems to scroll fine.

I've tried everything I can think of to stop the text from being selected, but I'm not 100% sure if that's the cause of the problem or just a symptom of something else (maybe bubbling or something?). I tried returning false on every mouse event on the lower panel, tried creating an absolutely-positioned mask above the text in the lower panel, tried removing all text from the lower panel, tried stopPropagation(), etc., but nothing seems to work.

If I set the mousedown/over/move on the lower panel to return false, it prevents selecting text normally by clicking the mouse & dragging, but it will STILL select the text if I click on the slider bar and drag down.

View 8 Replies View Related

Display Radio Selection In Text Area?

Oct 23, 2009

I'm attempting to display the output of the radio selection into the textbox.

For example, if the user selects 0-15 then display "Your age group is 0-15 years" in the text area.

i get the basic logic. i just dont understand how to display the value in the textbox. heres what i have so far if it will clarify my issue. code...

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved