JQuery :: Creating BbCode-like Functionality?
Oct 22, 2009
I've been trying to find out if jQuery has any functionality that can help me with creating bbCode style buttons (ie, like on this forum, click B and a [ b ] tag appears, second time creates a closing, or if you have text highlighted, it wraps it). I've tried Google-ing a lot, and randomly found this forum.I found/modified code using standard javascript a while ago,but I'd like to find out if jQuery has any funcionality that can help, mostly to learn.
View 3 Replies
ADVERTISEMENT
Dec 15, 2010
I have already written the BBCode controller in PHP, and so I just have to make the buttons that will add the bbcode when you click on them.The add image button I'm not sure about yet. I guess I could run a sql query on login of the contents of the database table, and store an array of image urls and thumbnails into a session, then have a 'pop-up' display the list of images you can choose from.Anyway, first thing's first. I need to be able to add the bbcode around text highlighted by the user, exactly like I am able to do with this handy SitePoint WYSIWYG editor I am using right now. So I need to grab the highlighted text with jQuery and then I can append the '[,b]' and '[/b]' round it.
View 3 Replies
View Related
Oct 8, 2006
I am working on developing a not too complex bbCode editor, the first part I want to set up is bold, italics, and underline. I have my layout set up with images for each style. How do I set my images up so when they are clicked the add a tag in the text area where the cursor is? Also, if text is highlighted, how can I set it up so opening and closing tags are wrapped around the highlighted text?
View 1 Replies
View Related
Dec 17, 2010
I've got this code to add bbcode into a wysiwyg rich text editor. Everything's working fine except when I want to add an image. The first time the script is run everything is ok, but the second time I get two image inserts, third time I get three and so on.
Here's the code:
Code:
$('#uploads tr').click(function(){
var filename = $(this).text();
var insert = '[img="'+filename+'"]';
textarea.value = textarea.value+insert;
$('#images').hide();
textarea.focus();
});
So first time I click on '#uploads tr', I get [img="filename"], then if I type some more stuff and then add another image, I get [img="filename"] 'Some more stuff' [img="filename2"][img="filename2"], then I'll get three image tags, then four and so on. I can see that it's something to do with the line I've highlighted, but I can't see why, or how to change it.
View 2 Replies
View Related
Jul 21, 2009
I'm trying to accomplish an accordion-like function, but instead of dropping down the section below, the content just lays over the other options.
For example, take a look at the Accordion example here: [url]
Notice how when section 2 is clicked, section 1 rolls up. I'm trying to achieve something where with section 1 open, the user would need to click on section 1 to close it and then could select section 2 which would overlay its content below, rather than pushing section 3 down.
Is there an option on accordion that I'm missing or can this be accomplished using another widget or plugin?
View 1 Replies
View Related
Aug 17, 2011
I want to make the add functionality in the jquery, where i can add successfully but i also want that when after add, my dialog closes, the div on parent should get refreshed and show me added entry, all is working but i have to reloadthe whole page to make it work
Here is my code!
So on close it should refresh my div or may be it should rerun my query to fetch final records from the db
Do not how, but how it will work!
Close the dialog this is where i tink needs some change, should it be edited enough that onclose it should refresh parent div and requery my query.
View 4 Replies
View Related
May 15, 2011
I m using a Jquery tab on my website and I want to disabe the mouseover funtionality. I was thinking it was just a case of removing the mouseover event from the javascript in the head of my code but; there is no mouse over event! that I can see, but the tabs are still changing on mouseover.
View 8 Replies
View Related
Dec 8, 2011
The CMS I use for my site currently runs/supports jQuery 1.7. The developers have chosen to leave the minified v1.2.6, v1.3.2, v1.4.2 files in the system too. I was wondering if any functionality was deleted over time from the lib. Does v1.7 contain all functionality from all older versions? Can I safely delete these older libs?
View 1 Replies
View Related
Jul 6, 2009
I want search functionality in the grid. I found one link but it is in php, but I don't know php. I want it in jsp. Here is the link: [URL] in this there is a take any example which contains search records it. One more link I got for grid but it does not have the functionality of searching another link: [URL].
View 4 Replies
View Related
Mar 24, 2009
I am using jquery in my current application to add min/max functionality, i.e, when the user close at maximize, table gets maximized, when clicked on minimize, table gets minimized. It works fine functionality wise, but, ideally, when maximized, max image should replace with min image and vice-versa, but images gets replaced only when clicked 2nd time around, for very first time, images don't get replaced, though the system works fine,
Here's how I am calling the function:
<a href="javascript:void(0);" onclick="showinghide('contacting')"><img src="images/arrows/opened.gif" id="contactingarrow" class="myarrows"></a>
Here's the function:
function showinghide(oobj){
if(oobj=="contacting"){
jQuery("#contacting").toggle('slow');
mycookies("contacting");
}
And the jquery code is:
function mycookies(myobbj) {
var mycookiesvar=myobbj+"cook";
if(jQuery.cookie(mycookiesvar)){
if(jQuery.cookie(mycookiesvar)==myobbj+"hide"){
jQuery.cookie(mycookiesvar,null);
jQuery.cookie(mycookiesvar,myobbj+"show",{expires:365});
jQuery("#"+myobbj+"arrow").attr({'src':'images/arrows/open_bk.gif'})
} else if(jQuery.cookie(mycookiesvar)==myobbj+"show"){
jQuery.cookie(mycookiesvar,null);
jQuery.cookie(mycookiesvar,myobbj+"hide",{expires:365});
jQuery("#"+myobbj+"arrow").attr({'src':'images/arrows/close_bk.gif'})
}} else {
jQuery.cookie(mycookiesvar,myobbj+"hide",{expires:365});
}}
View 5 Replies
View Related
Jan 28, 2011
I found a decent way to include a toggle feature for displaying detail rows underneath "parent" rows in a regular old HTML table displaying heaps of data: [url]
See "Expandable "Detail" Table Rows" rows section.
Would anyone know what it would take to add an "expand all/collapse all" link that would toggle all child rows open/hidden?
If so, how difficult would it be to have multiple tables with this functionality on the same html page?
View 10 Replies
View Related
Nov 1, 2011
I have successfully implemented the jquery cycle plugin, but on some machines we see poor performance. We are trying to implement the lite version and perform other optimizations in an effort to improve performance on older machines. Many functions of the cycle plugin we can go without, but one important feature is the ability to run a function once the cycle is finished. We accomplish this via "nowrap" and "end" without issue using the full plugin, but I believe these options to be missing from the lite as the function does not execute upon cycle end.
The first part of this topic is to determine (since there is no list of features available in the lite versus full) that the nowrap/end are not available in lite.If they are not available, we would like assistance in performing a simple function to redirect the user when the cycle ends. We are using the cycle plugin to create a "splash" page and we want the page to auto-redirect to the main page upon completion. The "end" function did this perfectly, so what options do we have to redirect the user without the "end" function?
View 1 Replies
View Related
Apr 9, 2011
I am attempting to build a page, however using some sample code the page have drag and drop functionality.
After using a simple jqeury statement to add to this form, every thing working (drag and drop)properly.
Now my actual requirement is
I need to generate the controls dynamically. Whne I generated all controls from server side and put all the generated controls HTML snipet in
<
div
id
="sort1"
class
="groupWrapper">
its working fine but when I try to put same HTML snippet in the same DIV using JavaScript drag and drop functionality not working;
Below is the code I am using.
Case when drag and drop functionality Not working.
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
[Code].....
View 2 Replies
View Related
Jul 22, 2009
I posted a while ago about the Truncate plugin not preserving html links in FF. I like the plugin, but it needs to present properly in FF. I couldn't figure it out and nobody responded. Is there any other plugins that provide similar funcationality?
View 2 Replies
View Related
Aug 4, 2010
I have implemented a tooltip type control in my site. Basically when a user rolls over an image with the class 'friend_pic', a div with the id "members_tooltip" pops up with more information about the source of the image and when the user rolls away from the image the div gets removed. The data is retrieved via an ajax post. The tooltip pops up down and to the right of the mouse pointer and there is also a function to move it as the mouse moves.
This sort of works but gets buggy if you roll around the image really quickly often the div's content will disappear but the empty div stays on the page. Here is how it is coded: //display a tooltip type popup with more information about a person when you hover over their pic
[Code]...
});Again it only happens when the mouse is moved really quickly, and the error is often the content of the tooltip being removed but the empty div remaining.
View 2 Replies
View Related
Feb 10, 2011
I'm trying to add jQuery validate plugin functionality to a D7 form. Here's what I've done so far: Enabled jQuery update module, so we're using jQuery 1.4.2 validate plugin in my theme's script folder Created form.js & called both it, and the validate plugin, in my .info file
Here's the initial contents of form.js:
(function ($) {
$(document).ready(function() {
// validate signup form on keyup and submit
var validator = $("#webform-client-form-53").validate({
[Code].....
The error is an unexpected "(". This is the syntax shown in the documentation, so I don't see what’s wrong here. After some checking, I was able to determine that it's the 2nd "(" that in line 6 that is being flagged.
View 2 Replies
View Related
Mar 25, 2009
I am trying to use jQuery's AJAX functionality to make a progress bar. A request is submited via AJAX, which starts importing data to a database. Once submited another AJAX request is called on an interval which checks the progress of this import, a progress meter is then updated using this information. However, the progress AJAX call which is fired on the submit of the form only returns once the import has complete. Its like its being blocked by the initial request? How I can get both calls to work at the same time?
View 9 Replies
View Related
Jul 27, 2009
I'm totally new to jquery, however I got a script working The script is looking for images with the class "thumbnail" and exchanges them by rollover....
jQuery(document).ready(function(){
jQuery("img.thumbnail").hover(
function()
[code].....
View 15 Replies
View Related
Jan 14, 2012
I am using a JQuery ToolTip on all links with a title="" and it works great. I want to add another class to (.shadow) and it only seems to work with one class.
Here is the code to initialize:
BTW I am using noConflict b/c I am running other JQuery scripts on the page.
I have tried:
And also:
Also tried creating two scripts. One with var $tooltip1 and the other with var tooltip2.
So far nothing has worked.
View 1 Replies
View Related
Nov 12, 2009
Strange behaviour of Flexgrids' Show/Hide Columns functionality when running on IE8. The 'down arrow' icon is displayed in the next columns header more and more so as you move across the grid from left to right.
View 2 Replies
View Related
Apr 14, 2011
I don't understand what should I do on the step 3 from Usage where it says
Connect the image cube functionality to your divisions
$(selector).imagecube();
View 4 Replies
View Related
Jun 19, 2009
Below is a block of code from a Wordpress plugin called "MM Forms", which handles form creation.The part of the code below deals with what happens when a form is submitted,which I believe is around this part:
[Code]...
View 3 Replies
View Related
Jul 7, 2010
My problem is quite annoying, probably something really stupid but I've been going around it and didn't find a solution.I call in 2 different pages to this partial view:
<div
id
=
"pNotification"
[Code].....
The funny thing about it is that in the first page I try it, it works just fine and it shows the value of the 3 buttons, but in the second, with the code I'm posting it only shows the alert window when I click on the 3rd radio button below. How is that even possible? It only happens in IE.
View 1 Replies
View Related
Jan 9, 2011
I was having no problems at all testing at home (FF, in private mode to keep cache clear, and error console to check... also Opera and Safari) when I suddenly lost functionality on several jQuery functions, all of them similarly structured. Couldn't find the problem; updated jQuery; stripped the codes back to one particular function; still no clue.
So: now the puzzle isonline.
The calls to load the elements in the page are in the <body> tag.
These capabilities work correctly: resizing, scrolling with arrows, popup from underlined link, dragging. What doesn't work is what should happen when you hover on any of the six-line figures: You should see a number underneath and on click, a change of color, and new text on the left.
Script file: hover is at line 100; the click function at line 78. The calls for the click function are here:
Testing again online, Opera (mac) now functions correctly. So, I think it may be something to do loading. I've put a delay to make sure the elements to be operated on are loaded before the functions which do the operating. Still no dice. It also seems to load really slowly, but that's minor at this point.
View 4 Replies
View Related
Nov 15, 2009
A little difficult to explain, but here goes:I've combined a couple different jquery scrollable functions to a webpage that I'm creating. URL...for my horizontal scrolling.The problem with the vertical scrolling function is that it relies on the mousewheel and mouse clicks for scrolling and I don't feel it's immediately apparent that the text scrolls. But I really like the effect, so I've added arrows and tried to get the functionality from the vertical scrolling example, but it's not working, except for the down arrow in the content in the very last tab. When you click on an arrow, it currently takes you to the previous or next horizontal section.
I know the answer is in there somewhere, but I'm not sure where to look for it. Here's the javascript file that controls the functionality:URL...
View 3 Replies
View Related
Jun 29, 2010
I use AJAX functionality in my project & my coding something similar to the following:
$('.home').click(function(event){
event.preventDefault();
$.ajax({
url: 'home.html',
[Code]....
Initially I (successfully) tested my project after deploying to the Apache server which is running in the localhost.
But, if I just open the page in a browser (without deploying to the server), the project works fine! How this is possible?
According to my understanding, if we send an AJAX request, which is really an HTTP request, which has to be received by an HTTP server and the response should come from the server.
View 3 Replies
View Related