Search Results

Search found 1481 results on 60 pages for 'highlight'.

Page 40/60 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Using css "active tab" technique on single page

    - by flash
    I'm building a navigation system using jquery scrollto. I have my navigation menu in a separate file (( navigation.php )). It is included in 5 locations on the first page (( 5 different sections w/ text following each )). I'm trying to figure out a way to have the current "tab" highlight'd. I could hard code the navigation in each location to ensure it shows up the correct way, but I'd rather use the phpinclude() method. The other issue is that each "tab" has it's own unique color (( cmykd )). Here is the alpha version of what I'm doing (( when you click && the page slides, the "active tab" still stays grey -- I'd like it to be the corresponding color )). Hope this all makes sense && thanks in advance !!

    Read the article

  • Should the name of my classes begin with 'Q' in Qt?

    - by Venemo
    Hello Everyone, When I first started working with Qt, it was extremely annoying that every class has a name beginning with 'Q', but now I've got used to it. I'm using Qt Creator, and it highlights code quite well. However, it only highlights class names beginning with 'Q'. And it highlights everything beginning with 'Q' even if there is no such type. It doesn't highlight custom class names. That makes me wonder, should I also begin all my class names with 'Q'? Or at least the reusable ones? (I mean, those that I put in a class library, or reuse in another app.) I've seen several places where they named their classes this way. Is it a good thing? I found this page about Qt's naming conventions, but it doesn't deal with this question. Also, I don't understand why Qt doesn't use namespaces.

    Read the article

  • Override tablesorter CSS

    - by user1712810
    I am using jquery tablesorter. When the page loads, I have a code to highlight the background color of certain rows in the table. Since tablesorter is used I guess it overrides the css and not allowing to change the background color of the rows. This is the code. This function automatically loads when the page gets loaded. I removed table-sorter to the table and tried this. It works. I have to get it to work with the table-sorter applied. $(document).ready(function() { var row, len, results; row = 0; results = []; while (row < len) { if ($("#tab1 #example_"+row+"chkbx").is(":checked")) { $("#tab1 #example_" + row).css("background-color", "#c6b79f"); } row++; } return results; });

    Read the article

  • I would like to learn C++, what is the first step ?

    - by Cesar
    My actual experience comes from PHP and Delphi(Borland) and recently also from Obj-C (iPhone sdk). In the past I also used Java, Python, VB 6 and some other scripting language. I would like to learn C++ because i need a standard tool for write compiled applications with good performance but i have no idea about witch environment i have to choose (Ex: Borland, Microsoft, Eclipse+MinGW, ...). Based those parameters: Most useful more opensource project or work requests Most standard not a proprietary versions Biggest community documentation, manuals, tutorials, forums... Better IDE add-ons, highlight, debug, cross platform, autocomplete... Easy setup A simple setup, to focus on learning the basics Actually I'm on OSX but I can use a VM if needed. Advices about tutorial or books are welcome. I hope it's not too generic as question.

    Read the article

  • Highlighting a radio button with CSS

    - by dsoftware
    I have been trying to highlight a radio button with CSS but have been unsuccessful to get styling to work in FireFox. I see some methods of using images to render highlighting. Is there a preferred way to handle radio button highlighting across multiple browsers? Example <input type="text" style="border-color:#FF0000"> <input type="radio" style="border-color:#FF0000"> The text box will have a border that is red but the radio button will not take the border color?

    Read the article

  • How to get current controller for a URL in Rails?

    - by valk
    I'm using this code to highlight currently active menu tab with Twitter Bootstrap: def nav_link_to(link_text, link_path, options = nil) class_name = current_page?(link_path) ? 'active' : '' content_tag(:li, :class => class_name) do link_to link_text, link_path, options end end This of course makes the link active, only if the given link IS the current page. How can I change this function, such that it would return 'active' for any links below current controller? In other words, for all actions for Posts controller, the links would be active? Thanks.

    Read the article

  • Right-click on a Listbox in a Silverlight 4 app.

    - by AngryHacker
    I am trying to implement what I used to take for granted in Winforms applications. I am a Silverlight noob, so hopefully all this is elementary. I have a listbox in a Silverlight 4 app. I'd like to do the following: Right-click on the listbox Have the item under the location where I click highlight itself I'd like a context menu to popup (with my own items in the context menu) From my research so far, it appears that there is no ContextMenu construct in Silverlight, instead we have to build up a Grid/Canvas structure and attach it to a Popup object, which is what is then popped up. My questions are as follows: To accomplish #2, I need some kind of hit test on the listbox. I can't figure out how to do that and my google-fu isn't helping. Once I do identify the index under the mouse, how do I actually select the item? Is there a reusable Context menu component somewhere that I can use? Extra credit if the component allows arbitrary sub-menus.

    Read the article

  • What is the trick in pAddress & ~(PAGE_SIZE - 1) to get the page's base address

    - by Dbger
    Following function is used to get the page's base address of an address which is inside this page: void* GetPageAddress(void* pAddress) { return (void*)((ULONG_PTR)pAddress & ~(PAGE_SIZE - 1)); } But I couldn't quite get it, what is the trick it plays here? Conclusion: Personally, I think Amardeep's explanation plus Alex B's example are best answers. As Alex B's answer has already been voted up, I would like to accept Amardeep's answer as the official one to highlight it! Thanks you all.

    Read the article

  • Javascript: setTimeout() - help needed

    - by ilkin
    Hi guys, I'm currently doing a highlighting function on a webpage and im using the jquery plugin for that. My code looks like this: var input = function() { var matchword = $('#searchbox').val(); if(matchword != "") { $('body').removeHighlight(); $('body').highlight($('#searchbox').val()); } } $(document).ready(function() { $('#searchbox').keyup(function() { setTimeout("input()", 2000); }); }); It works fine if there is not so large amount of data on the page. But in case of large amount of data on the page the whole process is slowing down which causes that inputbox is freezing untill the letter is hightlighted. So the typing is not smooth. I tryed to use a setTimeout but it seems doesnt help. Any ideas?

    Read the article

  • Jquery convert string of one type to string array.....

    - by chandru_cp
    Consider a string which is {"Table" : [{"Bird" : "Peacock"}, {"Bird" : "Crow"}]} to this ["Peacock", "Crow"] in jquery... Is this possible? EDIT: I am doing this but didnt work... $(document).ready(function() { var obj = JSON.parse('{"Table" : [{"Bird" : "Peacock"},{"Bird" : "Crow"}]}'); myarray = []; $.each(obj.table, function(i, v) { myarray.push(v.Bird); }); $("#tags").autocomplete(myarray, { width: 138, max: 4, highlight: false, multiple: true, multipleSeparator: " ", scroll: true, scrollHeight: 300 }); });

    Read the article

  • Map wont show rigth in Joomla

    - by user1653126
    I have the following code of a map using api google, I have tested the code in several html editor and its work perfectly, but when i upload in my web page doesn’t work. The map appears all zoomed in some random point in the ocean. I create an article in Joomla 1.5.20, paste the code. Its shows right in the preview but not in the web page. I disable filtering and use none editor and still won’t work. Thanks for the help. <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyBInlv7FuwtKGhzBP0oISDoB2Iu79HNrPU&sensor=false"> </script> <script type="text/javascript"> var map; // lets define some vars to make things easier later var kml = { a: { name: "Productor", url: "https://maps.google.hn/maps/ms?authuser=0&vps=2&hl=es&ie=UTF8&msa=0&output=kml&msid=200984447026903306654.0004c934a224eca7c3ad4" }, b: { name: "A&S", url: "https://maps.google.hn/maps/ms?ie=UTF8&authuser=0&msa=0&output=kml&msid=200984447026903306654.0004c94bac74cf2304c71" } // keep adding more if ye like }; // initialize our goo function initializeMap() { var options = { center: new google.maps.LatLng(13.324182,-87.080071), zoom: 9, mapTypeId: google.maps.MapTypeId.TERRAIN } map = new google.maps.Map(document.getElementById("map_canvas"), options); var ctaLayer = new google.maps.KmlLayer('https://maps.google.hn/maps/ms?authuser=0&vps=5&hl=es&ie=UTF8&oe=UTF8&msa=0&output=kml&msid=200984447026903306654.0004c94bc3bce6f638aa1'); ctaLayer.setMap(map); var ctaLayer = new google.maps.KmlLayer('https://maps.google.hn/maps/ms?authuser=0&vps=2&ie=UTF8&msa=0&output=kml&msid=200984447026903306654.0004c94ec7e838242b67d'); ctaLayer.setMap(map); createTogglers(); }; google.maps.event.addDomListener(window, 'load', initializeMap); // the important function... kml[id].xxxxx refers back to the top function toggleKML(checked, id) { if (checked) { var layer = new google.maps.KmlLayer(kml[id].url, { preserveViewport: true, suppressInfoWindows: true }); google.maps.event.addListener(layer, 'click', function(kmlEvent) { var text = kmlEvent.featureData.description; showInContentWindow(text); }); function showInContentWindow(text) { var sidediv = document.getElementById('content_window'); sidediv.innerHTML = text; } // store kml as obj kml[id].obj = layer; kml[id].obj.setMap(map); } else { kml[id].obj.setMap(null); delete kml[id].obj; } }; // create the controls dynamically because it's easier, really function createTogglers() { var html = "<form><ul>"; for (var prop in kml) { html += "<li id=\"selector-" + prop + "\"><input type='checkbox' id='" + prop + "'" + " onclick='highlight(this,\"selector-" + prop + "\"); toggleKML(this.checked, this.id)' \/>" + kml[prop].name + "<\/li>"; } html += "<li class='control'><a href='#' onclick='removeAll();return false;'>" + "Limpiar el Mapa<\/a><\/li>" + "<\/ul><\/form>"; document.getElementById("toggle_box").innerHTML = html; }; // easy way to remove all objects function removeAll() { for (var prop in kml) { if (kml[prop].obj) { kml[prop].obj.setMap(null); delete kml[prop].obj; } } }; // Append Class on Select function highlight(box, listitem) { var selected = 'selected'; var normal = 'normal'; document.getElementById(listitem).className = (box.checked ? selected: normal); }; </script> <style type="text/css"> .selected { font-weight: bold; } </style> </head> <body> <div id="map_canvas" style="width: 80%; height: 400px; float:left"></div> <div id="toggle_box" style="position: absolute; top: 100px; right: 640px; padding: 10px; background: #fff; z-index: 5; "></div> <div id="content_window" style="width:10%; height:10%; float:left"></div> </body> </html>

    Read the article

  • What is your favorite colorscheme FOR PROGRAMMING in Vim?

    - by ThomasGHenry
    I think this is a relevant question for programmers and I'd like to hear other people's answers because some syntax highlighting color schemes are better on the eyes than others. This can affect productivity as much as ergonomic keyboards or anything else on here. It's about comfort and productivity. So, I'm curious. Do you find some color schemes better adapted for some languages over others? At the other end of the spectrum, I think coding without syntax highlight is awful and slow going. Does anyone work better like this? Thanks! EDIT: so we'll try it as a community wiki. Similar Question

    Read the article

  • Is there a way to optimise finding text items on a page (not regex)

    - by Jeepstone
    After seeing several threads rubbishing the regexp method of finding a term to match within an HTML document, I've used the Simple HTML DOM PHP parser (http://simplehtmldom.sourceforge.net/) to get the bits of text I'm after, but I want to know if my code is optimal. It feels like I'm looping too many times. Is there a way to optimise the following loop? //Get the HTML and look at the text nodes $html = str_get_html($buffer); //First we match the <body> tag as we don't want to change the <head> items foreach($html->find('body') as $body) { //Then we get the text nodes, rather than any HTML foreach($body->find('text') as $text) { //Then we match each term foreach ($terms as $term) { //Match to the terms within the text nodes $text->outertext = str_replace($term, '<span class="highlight">'.$term.'</span>', $text->outertext); } } } For example, would it make a difference to determine check if I have any matches before I start the loop maybe?

    Read the article

  • Why are regular expressions such a complicated, cryptic mess?

    - by steffenj
    Often when I see regular expressions, I only see a total mess of characters. Why does it have to be this way? I guess what I really want to know is: are there alternatives to regular expressions that basically do the same thing but are implemented in a human readable language? [UPDATE] Thanks for all the great responses and inspiration! I wanted to highlight this particular link which shows how a (working) alternative would look like, which may also be a good starting point for learning or "simple" regex expressions. But you also quickly get a feel for the verbosity tradeoff.

    Read the article

  • Shell script syntax error: unexpected end of line

    - by user1557674
    I wrote a simple shell script to check for the existence of a xml file and if it exists, then rename an old xml file to be backup and then move the new xml file to where the old xml file was stored. #!/bin/sh oldFile="/Documents/sampleFolder/sampleFile.xml" newFile="/Documents/sampleFile.xml" backupFileName="/Documents/sampleFolder/sampleFile2.backup" oldFileLocation="/Documents/sampleFolder" if [ -f "$newFile" ] ; then echo "File found" #Rename old file mv $oldFile $backupFileName #move new file to old file's location mv $newFile $oldFileLocation else echo "File not found, do nothing" fi However, every time I try to run the script, I get 4 command not found messages and a syntax error: unexpected end of file. Any suggestions on why I get these command not found errors or the unexpected end of file? I double checked that I closed all my double quotes, I have code highlight :) EDIT: output from running script: : command not found: : command not found: : command not found1: : command not found6: replaceXML.sh: line 26: syntax error: unexpected end of file

    Read the article

  • How to set UITableViewCell highlighted image

    - by SmartTree
    I want to launch a method every time when user just highlights a cell (doesn't select it) in UITableView. Could you tell me please, how is it possible to do this ? I want to do it because I have a custom cell with a pictures on it and I want to change pictures every time when user highlights the cell. UPD: By highlight I mean that user just highlights a cell and don't release the finger from it. By select I mean when didSelectRowAtIndexPath is being launched (so the user releases the finger from the cell after he presses on it)

    Read the article

  • Any custom/third party Visual C# text box Controls with extra features?

    - by PlaZmaZ
    I'm writing a program that uses the textbox in visual C# to read a log file. When dealing with very large amounts of text, writing to the textbox is incredibly slow. The textbox also lacks many features. Are there any custom textbox controls that are faster, or even a sort of embedded editor (with ability to highlight certain words, indent, input bookmarks)? Many of the features I want are programmable, but it would be nice if there was a faster textbox or one that already had these features :) Thanks.

    Read the article

  • Highlighting current and previous stars on mouseover

    - by mpet
    I'm trying to make simple five star rating system using Twitter Bootstrap 3 i jQuery. For now, I'm trying to set .hover() and .mouseout() events using counter by writing this code that doesn't work: var i; for (i = 1; i <= 5; i++) { $('#overall_rating_' + i).hover(function(){ $('#overall_rating_' + i).removeClass("glyphicon-star-empty").addClass("glyphicon-star"); }); $('#overall_rating_' + i).mouseout(function(){ $('#overall_rating_' + i).removeClass("glyphicon-star").addClass("glyphicon-star-empty"); }); } Trying to highlight current and previous stars on mouseover. The code is not complete, it would be accompanied by additional sub-counters, but this part doesn't work for now. Any better methods are welcome. What's broken here?

    Read the article

  • PHP Case Insensitive Word Replacement

    - by zuk1
    Ok I'm trying to make search terms bold in this search script I'm making, except I can't get it to work case insensitive. function highlight($term,$target){ $terms = explode(" ", $term); foreach($terms as $term){ $result = (eregi_replace($term, "<strong>$term</strong>", $target)); } return $result; } That is the function I have so far.. It says on PHP.net that eregi_replace is case insensitive matching but it's obviously not working for some reason. (I'm a noob). Any ideas? :D

    Read the article

  • Isotope active class when using select menu

    - by Michael
    I am using Metafizzy's Isotope plugin and have it set up to filter using a select menu as seen here: http://jsfiddle.net/trewknowledge/jJZEN/ $(function() { var $container = $('#container'), $select = $('#filters select'); $container.isotope({ itemSelector: '.item' }); $select.change(function() { var filters = $(this).val(); ; $container.isotope({ filter: filters }); }); });? What I am trying to figure out is how I would add a highlight/active class to the selected elements when the filters variable is already being used.

    Read the article

  • JQuery: How to find what is between two text points

    - by Sarfraz
    Hello, Let's say I have this: <div id="wrapper"> <pre class="highlight"> $(function(){ // hide all links except for the first $('ul.child:not(:first)').hide(); $("a.slide:first").css("background-color","#FF9900"); /* The comment goes here. */ </pre> </div> With Jquery, I want to find what is in between: /* The comment goes here. */ Including those comment signs. So it should return: /* The comment goes here. */ How to do that, how to find text between two points? Thanks

    Read the article

  • Toggling row colors

    - by cf_PhillipSenn
    I have a table cell in the footer that allows the user to turn on row coloring: $('#highlight').click(function() { $(this).parents('table').RowColors(); }) // From Chapter 7 of Learning jQuery $.fn.RowColors = function() { $('tbody tr:odd', this).removeClass('even').addClass('odd'); $('tbody tr:even', this).removeClass('odd').addClass('even'); return this; }; Q: How do I write a selector that says: IF there is at least 1 row with class="even", then remove both "even" and "odd" ELSE execute the RowColors function.

    Read the article

  • Hilighting div tag in Masterpage on redirection to content page

    - by user1713632
    I have a link in Master page within a div tag. I want to highlight the div when I am clicking the link, in order to redirect to some content page. I have written the following code: <li> <div id="div_test" runat="server"> <asp:LinkButton ID="lnk_test_menu" Font-Underline="false" ForeColor="Black" runat="server" Text="Test Link" CausesValidation="false" onclick="lnk_test_menu_Click1" > </asp:LinkButton></div> </li> Code in the cs page: protected void lnk_test_menu_Click1(object sender, EventArgs e) { div_test.Attributes.Add("class", "testSelected"); Response.Redirect(Test.aspx"); } The div in the master page is not being selected on redirection. Could anybody help me on this?

    Read the article

  • Changing class of h2 inside specific div

    - by user1985060
    I want to make it so that everytime you click on an 'h2' tag, the 'input' inside gets selected and the 'h2' tag changes background, but if another 'h2' tag is clicked, the current highlight and 'input' selection changes accordingly. problem is that I have 3 different that do the same and with my code all the 3 forms are affected rather one. How do i limit my changes to only be contained to that form. Here is some code for clarification ' <form> ... <h2 onclick="document.getElementById(1001).checked='True' $('h2').removeClass('selected'); $(this).addClass('selected'); "> CONTENT <input type="radio" name="radio" id="1001" value="1001" /> </h2> ... </form>

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >