Search Results

Search found 753 results on 31 pages for 'selectors'.

Page 8/31 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Using CSS Classes for indivdual effects - opinions?

    - by Cool Hand Luke UK
    Hey, Just trying to canvas some opinions here. I was wondering how people go about adding individual effects to html elements. Take this example: you have three types of h1 titles all the same size but some are black some are gold and some are white. Some have a text-shadow etc. Would you create separate CSS classes and add them do the h1 tag or would you create a new single class for each different h1 title type (with grouped CSS elements)? With singular class for each effect you can build up combos of classes in html class="gold shadow" but also how would you name them. For example its bad practice to give classes and id names associated to colours, because it doesn't define what it does well. However is this ok with textual CSS classes? Just wondering what others do, I know there are no hard and fast rules. Cheers.

    Read the article

  • Getting value from href using jQuery

    - by bateman_ap
    Hi, I wonder if anyone can help with a jQuery problem I am having. I am using the tooltips from the Jquery Tools library to create a popup window when mousing over an hrefed image, this I want to use to cusomise the call to change the content in the DIV. The links I am using are in the form: <a href="/venue/1313.htm" class="quickView"><img src="/images/site/quickView83.png" alt="Quick View" width="83" height="20" /></a> The code I am using to trigger the tip is: $(".quickView").live('mouseover', function() { if (!$(this).data('init')) { $(this).data('init', true); ajax_quickView(); $(this).tooltip ({ /* tooltip configuration goes here */ tip: "#quickViewWindow", position: "right", offset: [0, -300], effect: 'slide' }); $(this).trigger('mouseover'); } }); I have tried the following function to grab the ID (in the example above, 1313) from the link: function ajax_quickView(){ var pageNum = $("a.quickView").attr("href").match(/venue/([0-9]+)/).htm[1]; $("#quickViewWindow").load("/quick-view/", function(){}) } However I think this is where it falls down, I think my regex is prob to blame... Once I get the var pageNum I presume I can just pass it into the .load as: $("#quickViewWindow").load("/quick-view/", {id : pageNum }, function(){}) Many thanks

    Read the article

  • jQuery + Not Selector

    - by Andrej
    Being a newbie to Javascript and jQuery, I am not sure whether this is not possible at all or I am just doing a completely dumb mistake: I am trying to hide a div on any click outside the div itself. I have simplified the code for demonstration purpose: HTML <html> <div class="tooltip"> Bla Bla Bla </div> </html> jQuery $('html:not(.tooltip)').click(function() { $('.tooltip').hide(); }); Demo http://jsfiddle.net/yCx6F/1/

    Read the article

  • Objective C selector memory managment (does this leak memory)?

    - by James Jones
    - (IBAction) someButtonCall { if(!someCondition) { someButtonCallBack = @selector(someButtonCall); [self presentModalViewController:someController animated:YES]; } else ... } //Called from someController - (void) someControllerFinished:(BOOL) ok { [self dismissModalViewControllerAnimated:YES]; if(ok) [self performSelector:someButtonCallBack]; else ... } I'm wondering if the user keeps getting into the !someCondition clause if the selector is leaked by assigning a new selector each time (the code above is hypothetical and not what i'm doing). Any help is appreciated. Thanks, James Jones

    Read the article

  • Subnav "active" when it shouldn't be.

    - by wilwaldon
    http://wilwaldon.com/itsbroken/templateleftnav.php As you can see on the left navigation the link for Template 01 is highlighted green. The link underneath is also highlighted green. I think the problem lies with the initial LI controlling the ul underneath somehow. I need to keep the xhtml formatted exactly how it is right now and only change the CSS to fix this problem. I'd appreciate any help you may be able to point me in the right direction, I'm pretty stuck at this point. Thank you in advance!

    Read the article

  • Html generate data and print from another page

    - by Hulk
    In the below code, in a.html there is this code as, <div id="tableview"></div>//Data loaded dynamically <input type="button" id="printbtn" onclick="print()"/> <script> function print() { var data=$('#tableview').html(); dataobj.print(); } In b.html I need to print a.html without opening it ,But without opening it how will the data in the div get generated and how to print only this data from b.html Thanks..

    Read the article

  • Jquery change function don’t work properly

    - by user1493448
    I have same id, name two html select. If I change first html select then it’s work properly but If I change second html select then it’s not work. Please can someone point out what I may be doing wrong here? Many thanks. Here is my code: <html> <head> <title>the title</title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" language="javascript"> $(document).ready(function() { $("#name").change(function(){ $.post( "data.php", $("#testform").serialize(), function(data) { $('#stage1').html(data); } ); var str = $("#testform").serialize(); $("#stage2").text(str); }); }); </script> </head> <body> <div id="stage1" style="background-color:blue; color: white"> STAGE - 1 </div> <form id="testform"> <table> <tr> <td><p>Fruit:</p></td> <td> <select id="name" name="name[]"> <option>Apple</option> <option>Mango</option> <option>Orange</option> <option>Banana</option> </select> </td> </tr> <tr> <td><p>Fruit:</p></td> <td> <select id="name" name="name[]"> <option>Apple</option> <option>Mango</option> <option>Orange</option> <option>Banana</option> </select> </td> </tr> </table> </form> </body> </html> Php code: <?php $fruit=$_REQUEST["name"]; $n = count($fruit); for($i=0;$i<$n; $i++) { echo $fruit[$i]."<br/>"; } ?>

    Read the article

  • CSS selector involving pseudo class first-child and dropcap

    - by Grnbeagle
    Hi, I need to format HTML similar to below. Basically a quote is optional, and I need to dropcap the first letter of the body paragraph. <article> <p class="quote"> <!-- quote is optional --> Genius begins great works; labor alone finishes them.-- Joseph Joubert </p> <p> <!-- "L" is a dropcap --> Life is like a box of chocolates. </p> <p>...</p> <p>...</p> </article> My CSS looks like this: article > p:first-child:first-letter { float: left; font-family: Georgia, serif; font-size: 360%; line-height: 0.85em; margin-right: 0.05em; } p.quote { font-weight: bold; } It doesn't work currently when the quote is introduced. AFAIK I can't select the article's first child P which is not class "quote." I'll use jQuery if I can't figure this out, but for now I'm looking for a way to do it CSS only. Thanks in advance!

    Read the article

  • CSS and jQuery slider height/positioning question

    - by wilwaldon
    TEST SITE If you look at the example above the slider on the right has 2 images. The first one is smaller than the second. The second is around 500px high. What I'm looking to do is expand the slider vertically depending on the height of the images inside. I believe the js is setting the height of the image when it is called from the server and I can't find a way to override it with the CSS. Any help would be very appreciated. Thank you!

    Read the article

  • Why is the SelectTemplate Method run 2 times in debug mode?

    - by msfanboy
    Hello, debuging this class the SelectTemplate Method is run 2 times, but why? The first time the item is always null. public class PersonDataTemplateSelector : DataTemplateSelector { public override DataTemplate SelectTemplate(object item,DependencyObject container) { if (item is Person) { Person person = item as Person; Window window = Application.Current.MainWindow; if (System.ComponentModel.DesignerProperties.GetIsInDesignMode( window)) return null; if (person.Gender == "male") return window.FindResource("boysViewTemplate") as DataTemplate; else return window.FindResource("girlsViewTemplate") as DataTemplate; } return null; } }

    Read the article

  • Conditional Statement as Hierarchy jQuery

    - by Jacob Lowe
    Is there a way to make jQuery use objects in a conditional statement as an object in a hierarchy. For Example, I want to validate that something exist then tell it to do something just using the this selector. Like this if ($(".tnImg").length) { //i have to declare what object I am targeting here to get this to work $(this).animate({ opacity: 0.5, }, 200 ); } Is there a way to get jQuery to do this? I guess theres not a huge benefit but i still am curious

    Read the article

  • jQuery - How to remove a DOM element BEFORE complete page load

    - by webfac
    Now this may seem like a silly question, but I need to know how to remove a DOM element BEFORE it is displayed to the user. In short, I am using a div that has a background image alerting the user to enable javascript before proceeding. If the user has javascript enabled I am using jQuery to remove the DOM element, in this case $(".check-js") which is the div housing the image. Using the conventional methods to unload DOM objects as follows does not work because it waits for the page load to complete, then removes the element, causing the image to flicker on and off each time the page loads: $(function(){ $(".check-js").css( {display:"none"} ) }) I simply want to remove the div if the user has js enabled, and he must never see this div. Any suggestions and I will be grateful, thanks.

    Read the article

  • pseudo class a:focus

    - by Les
    Trying to find out more about css pseudo class a:focus Am trying to adapt some code. Have tried a:focus img {border:2px solid rgb(155, 205, 255);} and a:focus img {background:rgb(155, 205, 255);} Neither work. Yet a:hover img {background:rgb(155, 205, 255);} works fine on hover. Does anyone know what I've done wrong? Les

    Read the article

  • Auto width on tables

    - by Hulk
    A html table cols and rows are generated dynamically, i.e, for the first instance it could be two rows and there columns. and next time it could be two rows and 10 columns My question is how to adjust the with automatically of the table so that the table always appears 100% in the page adjusting the coulmn size and row size <table> <tr><td></td><td></td><td></td></tr> <tr><td></td><td></td><td></td></tr> </table> <table> <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> <tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr> </table> Thanks..

    Read the article

  • how can i select first second or third element with given class name using CSS?

    - by Tumharyyaaden
    ie. i have the following: <div class="myclass">my text1</div> some other code+containers... <div class="myclass">my text2</div> some other code+containers... <div class="myclass">my text3</div> some other code+containers... i have the css class div.myclass {doing things} that applies to all obviously but i also wanted to be able to select the first, second or third like this: div.myclass:first {color:#000;} div.myclass:second {color:#FFF;} div.myclass:third {color:#006;} almost like the jQuery index selection .eq( index ) which is what i am using currently but need a noscript alternative. Thanks in advance!

    Read the article

  • setting a value through jquery

    - by Hulk
    <script> function edit(elem) { var ele=$(elem).siblings('label#test').html(); var a=document.getElementById('test'); var htm = '<input type="text" name="modal" id="modal" style="width:70%;" value="'+$(elem).siblings('label#test').html();+'"/>'; $dialog.html(htm) .dialog({ autoOpen: true, position: 'center' , title: 'EDIT', draggable: false, width : 300, height : 40, resizable : false, modal : true, buttons: { "Save" : function() { if($('#modal').val() != ''){a.value=$('#modal').val();$dialog.dialog('close');} else {alert('i++'+$('#modal').val()+'++');} } } }); $dialog.dialog('open'); } $(document).ready(function() { var flag=0; $("input:radio[@name=template]").click(function() { var checkedoption = $(this).val(); if (checkedoption == "template3") { if (flag == 0) { var html = '<input type="text" name="val" id="val" />&nbsp;&nbsp;&nbsp;<input type="button" value="Add" id="add"><br>'; $('#useroptions').append(html); flag=1; $('#add').click(function(){ var a = $('#val').val(); if (a == '') { alert('Enter options'); } else { var section= '<tr class="clickable"><td id="userval" BGCOLOR="#FF6699"><label id="test">' + a + '</label>&nbsp;&nbsp;&nbsp; <IMG SRC="/media/img/chunkedit.gif" onclick="javascript:edit(this);" >&nbsp;&nbsp;&nbsp;<IMG SRC="/media/img/close.gif" onclick="javascript:remove(this);" ></td></tr>'; $('#useroptions').append(section); } }); } } }); }); </script> <form> <table> <tr><td> <div id="useroptions"></div> </tr></td> </table> </form> How to set a new value for test in the above code.. Thanks

    Read the article

  • Aligning data in a table

    - by Hulk
    In the following table, how do I align the data in td cells such that we do not get a horizontal scroll bar, using CSS? <table> <tr><th>name</th> <th>info</th></tr> <tr><td>Harry</td> <td>suminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfosuminfo<td></tr> <tr><td>test</td><td>test data</td></tr> </table>

    Read the article

  • CSS not working in ASP.NET

    - by Tux
    Hi, I have created a simple page in HTML which works fine. But when I import that to ASP.NET, the page design clutters up. Here is my Site.Master <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Elite.WUI.Site" %> <!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" > <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <form id="form1" runat="server"> <asp:ContentPlaceHolder ID="headerCPH" runat="server"> <div id="header"> <h1>WUI</h1> </div> <hr /> </asp:ContentPlaceHolder> <asp:ContentPlaceHolder ID="navigationCPH" runat="server"> <div id="navigation"> <ul> <li>Home</li> <li>Users</li> <li>Campaigns</li> <li>Settings</li> </ul> </div> </asp:ContentPlaceHolder> <asp:ContentPlaceHolder ID="contentCPH" runat="server"> </asp:ContentPlaceHolder> </form> </body> </html> my stylesheet styles.css #navigation { float: left; border: 1pt solid; } #navigation ul { list-style-type: none; padding: 5 5 5 5; margin: 0; } #content { margin-left: 9%; border: 1pt solid; padding-left: 5; } and the actual page derived from master page <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ABC.aspx.cs" Inherits="Elite.WUI.ABC" %> <asp:Content ID="Content3" ContentPlaceHolderID="contentCPH" runat="server"> <div id="content"> <p>Test content</p> </div> </asp:Content> Here is how it is displayed in Firefox (ver 3.6) As you can see that the border, list-style-type properties are working but margin isn't working. Can anyone tell me what am I doing wrong? I have tested it in Google Chrome but same issue. While the HTML and CSS works fine when there is no ASP.NET i.e. simple .html file.

    Read the article

  • Position an icon on the right in the middle of a list item

    - by Andy
    I have the following code which prints an img if the current page is selected. The issue i have is if the list item is a varied height i cant position it in the middle of the list item on the far right... <li><?php echo $child->link($child->title); ?><?php echo (url_start_with($child->url) ? '<img src="images/ico-arrow.png" class="pointer">': null); ?></li> how can i ammend the "TOP" so that it will position itself vertically no matter what the height using css #bf-fest-list li { margin:0; padding:5px 25px; position:relative; } #bf-fest-list li a:hover { color:#ec1c23; text-decoration:none; } #bf-fest-list li.current { background:#a0a1a4; padding:10px 25px; } #bf-fest-list li.current a { color:#FFF; } #bf-fest-list li .pointer { position:absolute; top:10px; left:233px; }

    Read the article

  • Changing Opacity of All Elements but One Div

    - by waiwai933
    I'm trying to fade all elements on a webpage except for one div. I've been able to fade all the elements with the following jQuery: $('*').css('opacity', .3); However, it seems as if opacity is a property that inherits from parent elements, even if I explicitly set the opacity of the div to 1. I'm drawing a blank as to any solutions right now, so can I have some help here?

    Read the article

  • How to reinforce pseudo css rules

    - by danwoods
    Is there anyway to reinforce pseudo css rules? ie: I have a listing of divs (playlist) which I color with the following rules: #playlist .playlist_item { background: #d6d6d6; } #playlist .playlist_item:nth-child(odd) { background: #b3b3b3; } Now, when a song is playing, I use setInterval and JQuery's .animate function to pulse the background color. When the song is finished I clear the interval, but of course the song's background remains the last color set in the interval. Is there a way to re-set the song's color based on the CSS rule? Otherwise I'll have to keep track of the previous song (which may have changed position, and thus color) or setup distinct background color classes and reset the classes of all the songs in the playlist anytime someone adds, removes, or moves a song in the playlist or a song ends. I'd much rather use a CSS only approach. Thanks in advance, Dan

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >