Search Results

Search found 2593 results on 104 pages for 'span'.

Page 3/104 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • hProduct-microformats not work in google

    - by silverfox
    I'm trying to work with hProduct was testing tool for google microformats (http://www.google.com/webmasters/tools/richsnippets), but it is not recognizing the data: does not recognize the photo does not recognize the price does not recognize the category only recognizes the rating HTML: <div class="hproduct"> <span class="brand">ACME</span> <span class="fn">Executive Anvil</span> <img class="photo" src="http://microformats.org/wiki/skins/Microformats/images/logo.gif" /> <span class="review hreview-aggregate"> Average rating: <span class="rating">4.4</span>, based on <span class="count">89 </span> reviews </span> Regular price: $179.99 Sale: $<span class="price">119.99</span> (Sale ends 5 November!) <span class="description">Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height.</span> Category: <span class="category"> <span class="value-title" title="Hardware > Tools > Anvils">Anvils</span> </span> </div> and still shows this warning: waring: In order to generate a preview with rich snippets, either price or review or availability needs to be present. I used google's own example: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=186036 I also tested the microformas.org: http://microformats.org/wiki/google-rich-snippets-examples

    Read the article

  • Metro: Declarative Data Binding

    - by Stephen.Walther
    The goal of this blog post is to describe how declarative data binding works in the WinJS library. In particular, you learn how to use both the data-win-bind and data-win-bindsource attributes. You also learn how to use calculated properties and converters to format the value of a property automatically when performing data binding. By taking advantage of WinJS data binding, you can use the Model-View-ViewModel (MVVM) pattern when building Metro style applications with JavaScript. By using the MVVM pattern, you can prevent your JavaScript code from spinning into chaos. The MVVM pattern provides you with a standard pattern for organizing your JavaScript code which results in a more maintainable application. Using Declarative Bindings You can use the data-win-bind attribute with any HTML element in a page. The data-win-bind attribute enables you to bind (associate) an attribute of an HTML element to the value of a property. Imagine, for example, that you want to create a product details page. You want to show a product object in a page. In that case, you can create the following HTML page to display the product details: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Application1</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- Application1 references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> </head> <body> <h1>Product Details</h1> <div class="field"> Product Name: <span data-win-bind="innerText:name"></span> </div> <div class="field"> Product Price: <span data-win-bind="innerText:price"></span> </div> <div class="field"> Product Picture: <br /> <img data-win-bind="src:photo;alt:name" /> </div> </body> </html> The HTML page above contains three data-win-bind attributes – one attribute for each product property displayed. You use the data-win-bind attribute to set properties of the HTML element associated with the data-win-attribute. The data-win-bind attribute takes a semicolon delimited list of element property names and data source property names: data-win-bind=”elementPropertyName:datasourcePropertyName; elementPropertyName:datasourcePropertyName;…” In the HTML page above, the first two data-win-bind attributes are used to set the values of the innerText property of the SPAN elements. The last data-win-bind attribute is used to set the values of the IMG element’s src and alt attributes. By the way, using data-win-bind attributes is perfectly valid HTML5. The HTML5 standard enables you to add custom attributes to an HTML document just as long as the custom attributes start with the prefix data-. So you can add custom attributes to an HTML5 document with names like data-stephen, data-funky, or data-rover-dog-is-hungry and your document will validate. The product object displayed in the page above with the data-win-bind attributes is created in the default.js file: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { var product = { name: "Tesla", price: 80000, photo: "/images/TeslaPhoto.png" }; WinJS.Binding.processAll(null, product); } }; app.start(); })(); In the code above, a product object is created with a name, price, and photo property. The WinJS.Binding.processAll() method is called to perform the actual binding (Don’t confuse WinJS.Binding.processAll() and WinJS.UI.processAll() – these are different methods). The first parameter passed to the processAll() method represents the root element for the binding. In other words, binding happens on this element and its child elements. If you provide the value null, then binding happens on the entire body of the document (document.body). The second parameter represents the data context. This is the object that has the properties which are displayed with the data-win-bind attributes. In the code above, the product object is passed as the data context parameter. Another word for data context is view model.  Creating Complex View Models In the previous section, we used the data-win-bind attribute to display the properties of a simple object: a single product. However, you can use binding with more complex view models including view models which represent multiple objects. For example, the view model in the following default.js file represents both a customer and a product object. Furthermore, the customer object has a nested address object: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { var viewModel = { customer: { firstName: "Fred", lastName: "Flintstone", address: { street: "1 Rocky Way", city: "Bedrock", country: "USA" } }, product: { name: "Bowling Ball", price: 34.55 } }; WinJS.Binding.processAll(null, viewModel); } }; app.start(); })(); The following page displays the customer (including the customer address) and the product. Notice that you can use dot notation to refer to child objects in a view model such as customer.address.street. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Application1</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- Application1 references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> </head> <body> <h1>Customer Details</h1> <div class="field"> First Name: <span data-win-bind="innerText:customer.firstName"></span> </div> <div class="field"> Last Name: <span data-win-bind="innerText:customer.lastName"></span> </div> <div class="field"> Address: <address> <span data-win-bind="innerText:customer.address.street"></span> <br /> <span data-win-bind="innerText:customer.address.city"></span> <br /> <span data-win-bind="innerText:customer.address.country"></span> </address> </div> <h1>Product</h1> <div class="field"> Name: <span data-win-bind="innerText:product.name"></span> </div> <div class="field"> Price: <span data-win-bind="innerText:product.price"></span> </div> </body> </html> A view model can be as complicated as you need and you can bind the view model to a view (an HTML document) by using declarative bindings. Creating Calculated Properties You might want to modify a property before displaying the property. For example, you might want to format the product price property before displaying the property. You don’t want to display the raw product price “80000”. Instead, you want to display the formatted price “$80,000”. You also might need to combine multiple properties. For example, you might need to display the customer full name by combining the values of the customer first and last name properties. In these situations, it is tempting to call a function when performing binding. For example, you could create a function named fullName() which concatenates the customer first and last name. Unfortunately, the WinJS library does not support the following syntax: <span data-win-bind=”innerText:fullName()”></span> Instead, in these situations, you should create a new property in your view model that has a getter. For example, the customer object in the following default.js file includes a property named fullName which combines the values of the firstName and lastName properties: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { var customer = { firstName: "Fred", lastName: "Flintstone", get fullName() { return this.firstName + " " + this.lastName; } }; WinJS.Binding.processAll(null, customer); } }; app.start(); })(); The customer object has a firstName, lastName, and fullName property. Notice that the fullName property is defined with a getter function. When you read the fullName property, the values of the firstName and lastName properties are concatenated and returned. The following HTML page displays the fullName property in an H1 element. You can use the fullName property in a data-win-bind attribute in exactly the same way as any other property. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Application1</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- Application1 references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> </head> <body> <h1 data-win-bind="innerText:fullName"></h1> <div class="field"> First Name: <span data-win-bind="innerText:firstName"></span> </div> <div class="field"> Last Name: <span data-win-bind="innerText:lastName"></span> </div> </body> </html> Creating a Converter In the previous section, you learned how to format the value of a property by creating a property with a getter. This approach makes sense when the formatting logic is specific to a particular view model. If, on the other hand, you need to perform the same type of formatting for multiple view models then it makes more sense to create a converter function. A converter function is a function which you can apply whenever you are using the data-win-bind attribute. Imagine, for example, that you want to create a general function for displaying dates. You always want to display dates using a short format such as 12/25/1988. The following JavaScript file – named converters.js – contains a shortDate() converter: (function (WinJS) { var shortDate = WinJS.Binding.converter(function (date) { return date.getMonth() + 1 + "/" + date.getDate() + "/" + date.getFullYear(); }); // Export shortDate WinJS.Namespace.define("MyApp.Converters", { shortDate: shortDate }); })(WinJS); The file above uses the Module Pattern, a pattern which is used through the WinJS library. To learn more about the Module Pattern, see my blog entry on namespaces and modules: http://stephenwalther.com/blog/archive/2012/02/22/windows-web-applications-namespaces-and-modules.aspx The file contains the definition for a converter function named shortDate(). This function converts a JavaScript date object into a short date string such as 12/1/1988. The converter function is created with the help of the WinJS.Binding.converter() method. This method takes a normal function and converts it into a converter function. Finally, the shortDate() converter is added to the MyApp.Converters namespace. You can call the shortDate() function by calling MyApp.Converters.shortDate(). The default.js file contains the customer object that we want to bind. Notice that the customer object has a firstName, lastName, and birthday property. We will use our new shortDate() converter when displaying the customer birthday property: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { var customer = { firstName: "Fred", lastName: "Flintstone", birthday: new Date("12/1/1988") }; WinJS.Binding.processAll(null, customer); } }; app.start(); })(); We actually use our shortDate converter in the HTML document. The following HTML document displays all of the customer properties: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Application1</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- Application1 references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> <script type="text/javascript" src="js/converters.js"></script> </head> <body> <h1>Customer Details</h1> <div class="field"> First Name: <span data-win-bind="innerText:firstName"></span> </div> <div class="field"> Last Name: <span data-win-bind="innerText:lastName"></span> </div> <div class="field"> Birthday: <span data-win-bind="innerText:birthday MyApp.Converters.shortDate"></span> </div> </body> </html> Notice the data-win-bind attribute used to display the birthday property. It looks like this: <span data-win-bind="innerText:birthday MyApp.Converters.shortDate"></span> The shortDate converter is applied to the birthday property when the birthday property is bound to the SPAN element’s innerText property. Using data-win-bindsource Normally, you pass the view model (the data context) which you want to use with the data-win-bind attributes in a page by passing the view model to the WinJS.Binding.processAll() method like this: WinJS.Binding.processAll(null, viewModel); As an alternative, you can specify the view model declaratively in your markup by using the data-win-datasource attribute. For example, the following default.js script exposes a view model with the fully-qualified name of MyWinWebApp.viewModel: (function () { "use strict"; var app = WinJS.Application; app.onactivated = function (eventObject) { if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) { // Create view model var viewModel = { customer: { firstName: "Fred", lastName: "Flintstone" }, product: { name: "Bowling Ball", price: 12.99 } }; // Export view model to be seen by universe WinJS.Namespace.define("MyWinWebApp", { viewModel: viewModel }); // Process data-win-bind attributes WinJS.Binding.processAll(); } }; app.start(); })(); In the code above, a view model which represents a customer and a product is exposed as MyWinWebApp.viewModel. The following HTML page illustrates how you can use the data-win-bindsource attribute to bind to this view model: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Application1</title> <!-- WinJS references --> <link href="//Microsoft.WinJS.0.6/css/ui-dark.css" rel="stylesheet"> <script src="//Microsoft.WinJS.0.6/js/base.js"></script> <script src="//Microsoft.WinJS.0.6/js/ui.js"></script> <!-- Application1 references --> <link href="/css/default.css" rel="stylesheet"> <script src="/js/default.js"></script> </head> <body> <h1>Customer Details</h1> <div data-win-bindsource="MyWinWebApp.viewModel.customer"> <div class="field"> First Name: <span data-win-bind="innerText:firstName"></span> </div> <div class="field"> Last Name: <span data-win-bind="innerText:lastName"></span> </div> </div> <h1>Product</h1> <div data-win-bindsource="MyWinWebApp.viewModel.product"> <div class="field"> Name: <span data-win-bind="innerText:name"></span> </div> <div class="field"> Price: <span data-win-bind="innerText:price"></span> </div> </div> </body> </html> The data-win-bindsource attribute is used twice in the page above: it is used with the DIV element which contains the customer details and it is used with the DIV element which contains the product details. If an element has a data-win-bindsource attribute then all of the child elements of that element are affected. The data-win-bind attributes of all of the child elements are bound to the data source represented by the data-win-bindsource attribute. Summary The focus of this blog entry was data binding using the WinJS library. You learned how to use the data-win-bind attribute to bind the properties of an HTML element to a view model. We also discussed several advanced features of data binding. We examined how to create calculated properties by including a property with a getter in your view model. We also discussed how you can create a converter function to format the value of a view model property when binding the property. Finally, you learned how to use the data-win-bindsource attribute to specify a view model declaratively.

    Read the article

  • changing text periodically in a span from an array with jquery

    - by Peter Clark
    I have a span, eg: <p>Here is a sentence <span id="rotate">this</span> is what changes</p> and I'd like the contents of that span to change every few moments between a list of terms, so the contents might change to be: <span id="rotate">then</span> <span id="rotate">thus</span> and so on. I'd like the text to fade out and then the new text fade in. Whats the best way to do this via jquery?

    Read the article

  • Is there a semantic difference <span>'s and <div>'s?

    - by DavidR
    I know when coding HTML, I'm supposed to keep semantics in mind, e.g., h1 needs to be a main header, h2 needs to be a subheader, tables need to be tables, use <em> for emphasis instead of <i>, etc. Is there a proper difference between divs and spans except one is a block and the other is in-line? When I was learning I was told that <span>'s were for styling text mid-line. If I had a small blurb of text that I needed positioned at a certain point in my webpage, one that doesn't warrent a <p> tag, would I use a span should I stick with div's? What if that text needs to cover two lines (i.e., it needs a width) if it contains nothing but text, what should I use?

    Read the article

  • Insert <div> outside every three <li>

    - by ignaty
    Hello. I have something like this: function cat_filter() { $.ajax({ type: "POST", url: 'json/cat_filter.aspx', data: "catId=" + "&styleId=" + "&colourId=" + "&sizeId=" + "&minPrice=" + "&maxPrice=", dataType: "json", beforeSend: function () { //load loading cursor }, success: function (data) { var CatItems = ""; for (var x = 0; x < data.PRODUCTS.length; x++) { CatItems += '<li class="jcarousel-item jcarousel-item-horizontal jcarousel-item-' + [x] + ' jcarousel-item-' + [x] + '-horizontal jcarousel-item-placeholder jcarousel-item-placeholder-horizontal"><a class="large_image" href="#"><img src="' + data.PRODUCTS[x].product_img + '" alt="' + data.PRODUCTS[x].product_name + '"></a><h3 class="geo_17_darkbrown">' + data.PRODUCTS[x].product_name + '</h3>'; if (data.PRODUCTS[x].product_onsale == 1) { CatItems += '<img alt="sale" src="assets/images/sale.gif" class="sale"><span class="geo_17_red_linethr">&pound;' + data.PRODUCTS[x].product_retailprice + '</span>&nbsp;&nbsp;<span class="price geo_17_darkbrown">&pound;' + data.PRODUCTS[x].product_webprice + '</span>'; } else { CatItems += '<span class="price geo_17_darkbrown">&pound;' + data.PRODUCTS[x].product_webprice + '</span>'; } if (data.PRODUCTS[x].product_COLOURS) { CatItems += '<span class="colour">'; for (var y = 0; y < data.PRODUCTS[x].product_COLOURS.length; y++) { CatItems += '<span><a href="' + data.PRODUCTS[x].product_COLOURS[y].colours_large + '"><img src="' + data.PRODUCTS[x].product_COLOURS[y].colours_thumb + '" alt="' + data.PRODUCTS[x].product_COLOURS[y].colour_name + '" /></a></span>'; } CatItems += '</span>'; } CatItems += '</li>'; } $('.carousel_00 ul').html(CatItems); }, complete: function () { //remove loading cursor } }); } This code generates this html: <div class="carousel_00"> <ul> <li><a href="#" class="large_image"><img src="assets/images/dress1.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> <span class="colour"> <span><a href="assets/images/big_image_1.gif"><img src="assets/images/black.gif" alt="balck"></a></span> <span><img src="assets/images/brown.gif" alt="brown"></span> <span><img src="assets/images/purple.gif" alt="purple"></span> </span> </li> <li><a href="#"><img src="assets/images/dress2.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><img class="sale" src="assets/images/sale.gif" alt="sale" /><a href="#"><img src="assets/images/dress3.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="geo_17_red_linethr">&pound;99.99</span>&nbsp;&nbsp;<span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress1.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;59.99</span> </li> <li><a href="#"><img src="assets/images/dress2.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress3.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress1.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress2.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> <li><a href="#"><img src="assets/images/dress3.gif" alt="image"></a> <h3 class="geo_17_darkbrown">Rachel Dress</h3> <span class="price geo_17_darkbrown">&pound;89.99</span> </li> </ul></div> What I need is that every 3 li's will be in div /div. I know that this is not semantic and not right, but this is only for example. (Basically if I will figure put how to do this, I will replace li's on spans and that div that i need outside li's on li). Will be very glad if someone will help me. Because code that I have is already too much for me.

    Read the article

  • Rails link to PDF version of show.html.erb

    - by Danny McClelland
    Hi Everyone, I have created a pdf version of our rails application using the Prawn plugin, the page in question is part of the Kase model - the link to the kase is /kases/1 and the link to the pdf version is /kases/1.pdf. How can I add a link within the show.html.erb to the PDF file so whichever page is being viewed it updates the URL to the correct case id? <% content_for :header do -%> <%=h @kase.jobno %> | <%=h @kase.casesubject %> <% end -%> <!-- #START SIDEBAR --> <% content_for :sidebar do -%> <% if @kase.avatar.exists? then %> <%= image_tag @kase.avatar.url %> <% else %> <p style="font-size:smaller"> You can upload an icon for this case that will display here. Usually this would be for the year number icon for easy recognition.</p> <% end %> <% end %> <!-- #END SIDEBAR --> <ul id="kases_showlist"> <li>Date Instructed: <span><%=h @kase.dateinstructed %></span></li> <li>Client Company: <span><%=h @kase.clientcompanyname %></span></li> <li>Client Reference: <span><%=h @kase.clientref %></span></li> <li>Case Subject: <span><%=h @kase.casesubject %></span></li> <li>Transport<span><%=h @kase.transport %></span></li> <li>Goods<span><%=h @kase.goods %></span></li> <li>Case Status: <span><%=h @kase.kase_status %></span></li> <li>Client Company Address: <span class="address"><%=h @kase.clientcompanyaddress %></span></li> <li>Client Company Fax: <span><%=h @kase.clientcompanyfax %></span></li> <li>Case Handler: <span><%=h @kase.casehandlername %></span></li> <li>Case Handler Tel: <span><%=h @kase.casehandlertel %></span></li> <li>Case Handler Email: <span><%=h @kase.casehandleremail %></span></li> <li>Claimant Name: <span><%=h @kase.claimantname %></span></li> <li>Claimant Address: <span class="address"><%=h @kase.claimantaddress %></span></li> <li>Claimant Contact: <span><%=h @kase.claimantcontact %></span></li> <li>Claimant Tel: <span><%=h @kase.claimanttel %></span></li> <li>Claiment Mob: <span><%=h @kase.claimantmob %></span></li> <li>Claiment Email: <span><%=h @kase.claimantemail %></span></li> <li>Claimant URL: <span><%=h @kase.claimanturl %></span></li> <li>Comments: <span><%=h @kase.comments %></span></li> </ul> <!--- START FINANCE INFORMATION --> <div id="kase_finances"> <div class="js_option"> <h2>Financial Options</h2><p class="finance_showhide"><%= link_to_function "Show","Element.show('finance_showhide');" %> / <%= link_to_function "Hide","Element.hide('finance_showhide');" %></p> </div> <div id="finance_showhide" style="display:none"> <ul id="kases_new_finance"> <li>Invoice Number<span><%=h @kase.invoicenumber %></span></li> <li>Net Amount<span><%=h @kase.netamount %></span></li> <li>VAT<span><%=h @kase.vat %></span></li> <li>Gross Amount<span><%=h @kase.grossamount %></span></li> <li>Date Closed<span><%=h @kase.dateclosed %></span></li> <li>Date Paid<span><%=h @kase.datepaid %></span></li> </ul></div> </div> <!--- END FINANCE INFORMATION --> <%= link_to 'Edit Case', edit_kase_path(@kase) %> | <%= link_to 'Back', kases_path %> | <a href="#">Top</a> <div style="width:120%; height: 50px; background-color: black; margin: 10px 0 0 -19px; padding: 0; background-color: #d4d4d4;">&nbsp;</div> <div class="js_option_kaseemails"> <%= link_to_function "Show", "Element.show('newinstructionemail1');" %> / <%= link_to_function "Hide", "Element.hide('newinstructionemail1');" %> </div> <h3>New Instruction Email</h3> <div id="newinstructionemail1" style="display:none"> <p class="kase_email_output"> Hi,<br /> <br /> Many thanks for your instructions in the subject matter.<br /> <br /> We have allocated reference number <%=h @kase.jobno %> to the above claim.<br /> <br /> We have started our inquiries and will be in touch.<br /> <br /> Best Regards,<br /> <br /> <strong><%=h current_user.name %></strong> <br /> McClelland &amp; Co<br /> PO Box 149<br /> Southport<br /> PR8 4GZ<br /> <br /> Tel: +(0) 1704 569871<br /> Fax: +(0) 1704 562234<br /> Mob: <%=h current_user.mobile %><br /> E-mail: <%= current_user.email %><br /> <br /> This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you receive this e-mail in error please notify the originator of the message. <br /><br /> McClelland &amp; Co has taken every reasonable precaution to ensure that any attachment to this e-mail has been checked for viruses but it is strongly recommended that you carry out your own virus check before opening any attachment. McClelland &amp; Co cannot accept liability for any damage sustained as a result of software virus infection. </p> <%= link_to 'Edit Case', edit_kase_path(@kase) %> | <%= link_to 'Back', kases_path %> | <a href="#">Top</a> </div> <div style="width:120%; height: 20px; background-color: black; margin: 10px 0 0 -19px; padding: 0; background-color: #d4d4d4;">&nbsp;</div> <div class="js_option_kaseemails"> <%= link_to_function "Show", "Element.show('newinstructionemail');" %> / <%= link_to_function "Hide", "Element.hide('newinstructionemail');" %> </div> <h3>New Instruction Email</h3> <div id="newinstructionemail" style="display:none"> <p class="kase_email_output"> Hi,<br /> <br /> Many thanks for your instructions in the subject matter.<br /> <br /> We have allocated reference number <%=h @kase.jobno %> to the above claim.<br /> <br /> We have started our inquiries and will be in touch.<br /> <br /> Best Regards,<br /> <br /> <strong><%=h current_user.name %></strong> <br /> McClelland &amp; Co<br /> PO Box 149<br /> Southport<br /> PR8 4GZ<br /> <br /> Tel: +(0) 1704 569871<br /> Fax: +(0) 1704 562234<br /> Mob: <%=h current_user.mobile %><br /> E-mail: <%= current_user.email %><br /> <br /> This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you receive this e-mail in error please notify the originator of the message. <br /><br /> McClelland &amp; Co has taken every reasonable precaution to ensure that any attachment to this e-mail has been checked for viruses but it is strongly recommended that you carry out your own virus check before opening any attachment. McClelland &amp; Co cannot accept liability for any damage sustained as a result of software virus infection. </p> <%= link_to 'Edit Case', edit_kase_path(@kase) %> | <%= link_to 'Back', kases_path %> | <a href="#">Top</a> </div> <div style="width:120%; height: 20px; background-color: black; margin: 10px 0 0 -19px; padding: 0; background-color: #d4d4d4;">&nbsp;</div> <div class="js_option_kaseemails"> <%= link_to_function "Show", "Element.show('newinstructionemail2');" %> / <%= link_to_function "Hide", "Element.hide('newinstructionemail2');" %> </div> <h3>New Instruction Email</h3> <div id="newinstructionemail2" style="display:none;"> <p class="kase_email_output"> Hi,<br /> <br /> Many thanks for your instructions in the subject matter.<br /> <br /> We have allocated reference number <%=h @kase.jobno %> to the above claim.<br /> <br /> We have started our inquiries and will be in touch.<br /> <br /> Best Regards,<br /> <br /> <strong><%=h current_user.name %></strong> <br /> McClelland &amp; Co<br /> PO Box 149<br /> Southport<br /> PR8 4GZ<br /> <br /> Tel: +(0) 1704 569871<br /> Fax: +(0) 1704 562234<br /> Mob: <%=h current_user.mobile %><br /> E-mail: <%= current_user.email %><br /> <br /> This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you receive this e-mail in error please notify the originator of the message. <br /><br /> McClelland &amp; Co has taken every reasonable precaution to ensure that any attachment to this e-mail has been checked for viruses but it is strongly recommended that you carry out your own virus check before opening any attachment. McClelland &amp; Co cannot accept liability for any damage sustained as a result of software virus infection. </p> <%= link_to 'Edit Case', edit_kase_path(@kase) %> | <%= link_to 'Back', kases_path %> | <a href="#">Top</a> </div> Thanks, Danny

    Read the article

  • How to disabled the input,textarea,select using this code..

    - by kumar
    Hello friends I am using this code in my view.. <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NorthernTrust.ATP.iTool.Core.Business.Entities.Exceptions.PricingMassEditBE>" %> <script type="text/javascript"> $("#PricingEditExceptions").find("input, select,textarea").attr('disabled', 'disabled'); </script> <%var a = Model; %> <fieldset id="PricingEditExceptions"> <div class="fiveper"> <label>FM#: <span><%=(null != a) ? Model.Asset.FundmasterSec : null%></span></label> <label>TNT#:<span><%=(null != a) ? Model.Asset.TNTSecurity: null%></span></label> <label>CUSIP#: <span><%=(null != a) ? Model.Asset.CUSIP :null%></span></label> <label>Asset:<span><%=(null != a) ? Model.Asset.AssetClassCode: null%></span></label> <label>Issue:<span><%=(null != a) ? Model.Asset.IssueType: null%></span></label> <label>COQ:<span><%=(null != a) ? Model.Asset.CodeCountryofQuotationName: null%></span></label> <label>CCY:<span><%=(null != a) ? Model.Asset.CurrencyCode: null%></span></label> <label>&nbsp;</label> </div> <div class="fiveper"> <input id="check1" type="checkbox" name="PMchk" value="<%=Model.ExceptionID%>" /> <label>ID#: <span><%=(null != a) ? Model.ExceptionID : 0%></span></label> <label for="ExceptionStatus"> Status: <span id="gui-stat-<%=Model.ExceptionID %>"> <%=Model.LookupCodes["C_EXCPT_STAT"].FirstOrDefault(model => model.Key.Trim().Equals(Model.ExceptionStatus.Trim())).Value%></span> </label> <label for="ResolutionCode"> Resolution: <span> <%=Html.DropDownListFor(model => model.ResolutionCode, new SelectList(Model.LookupCodes["C_EXCPT_RESL"], "Key", "Value", (null != Model.ResolutionCode) ? Model.ResolutionCode.Trim() : Model.ResolutionCode))%> </span> </label> <label for="ReasonCode"> Reason: <span><%=Html.DropDownListFor(model => model.ReasonCode, new SelectList(Model.LookupCodes["C_EXCPT_RSN"], "Key", "Value", (null != Model.ReasonCode) ? Model.ReasonCode.Trim() : Model.ReasonCode))%></span> </label> <label>Action Taken:<span><%=Html.DropDownListFor(model => model.ActionCode, new SelectList(Model.LookupCodes["C_EXCPT_ACT"], "Key", "Value", (null != Model.ActionCode) ? Model.ActionCode.Trim() : Model.ActionCode))%></span></label> <label>&nbsp;</label> </div> <div class="fiveper"> <label>Follow-Up:<span class="datepicker-container"><input type="text" id="exc-flwup-<%=Model.ExceptionID %>" name="exc-flwup-<%=Model.ExceptionID %>" value="<%=Model.FollowupDate %>" /></span></label> <label>Inqurity #: <span><%=Html.EditorFor(model => model.IOL)%></span> </label> <label>&nbsp;</label> <label>Comment: <span> <%=Html.TextAreaFor(model => model.Comment, new { })%> <%=Html.ValidationMessageFor(model => model.Comment)%> </span> </label> </div> <div id="hide" style="display:none"> <label><span><%=Model.Sequence %></span></label> <label><span><%=Model.AssignedId %></span></label> <span id="gui-stat-<%=Model.ExceptionID%>"> <%=Model.LookupCodes["C_EXCPT_STAT"].FirstOrDefault(model => model.Key.Trim().Equals(Model.ExceptionStatus.Trim())).Value%></span> <span>Last Updated:</span> <%=Model.LastUpdateUser.StartsWith("ATPB") ? "SYSTEM" : Model.LastUpdateUser%><br /> <%=Model.LastUpdated%> <% if (DateTime.Now.Date == Model.LastUpdated.Value .Date ) {%> <%=Math.Round((DateTime.Now - (DateTime)Model.LastUpdated).TotalHours, 0)%> hr<%} %> <p> <%=Html.EditorFor(model => model.SequenceDateTimeAsString)%> <%=Html.EditorFor(model => model.AssignedId)%> <span><%=Html.EditorFor(model => model.Origination)%></span> </p> </div> </fieldset> <script type="text/javascript"> $(document).ready(function() { function validate_excpt(formData, jqForm, options) { var form = jqForm[0]; } // post-submit callback function showResponse(responseText, statusText, xhr, $form) { if (responseText.substring(0, 16) != "System.Exception") { $('#error-msg-<%=Model.ExceptionID %> span:last').html('<strong>Update successful.</strong>'); } else { $('#error-msg-<%=Model.ExceptionID %> span:last').html('<strong>Update failed.</strong> ' + responseText.substring(0, 48)); } $('#error-msg-<%=Model.ExceptionID %>').removeClass('hide'); $('#gui-stat-<%=Model.ExceptionID %>').html(responseText[1]); } $('#exc-<%=Model.ExceptionID %>').ajaxForm({ target: '#error-msg-<%=Model.ExceptionID %>', beforeSubmit: validate_excpt, success: showResponse, dataType: 'json' }).enable(<%=Model.EnableEdit.ToString().ToLower() %>); $("input[id^='exc-flwup-']").datepicker({ duration: 0, buttonImage: '/Content/images/calender.gif', buttonImageOnly: true, showOn:'button', constrainInput: true, showTime: true, stepMinutes: 30, stepHours: 1, altTimeField: '', time24h: true, minDate: 0 }); $("input[id^='exc-flwup-<%=Model.ExceptionID%>']").click(function() { $(this).val(''); }); $('#ui-timepicker-div').bgiframe(); }); </script> Using this code I am disabling the fields when the view loads.. like this my view displyas for number of users which I am going to selct using this below code I am able to disable only first Fiedset not for other fieldsets? $("#Fieldset1").find("input, select,textarea").attr('disabled', 'disabled'); why its happening? I need to disable for how many users I select.... thanks..

    Read the article

  • Remove newlines and spaces

    - by Cosmin
    How can I remove newline between <table> .... </table> and add \n after each ex: <table border="0" cellspacing="0" cellpadding="0" width="450" class="descriptiontable"><tr> <td width="50%" valign="top"> <span class="displayb">Model Procesor:</span> Intel Celeron<br><span class="displayb">Frecventa procesor (MHz):</span> 2660<br><span class="displayb">Placa Video:</span> Intel Extreme Graphics 2<br><span class="displayb">Retea integrata:</span> 10/100Mbps, RJ-45<br><span class="displayb">Chipset:</span> Intel 845G<br> </td> <td width="50%" valign="top"> <span class="displayb">Capacitate RAM (MB):</span> 512<br><span class="displayb">Tip RAM:</span> DDR<br> </td> </tr></table> and become : <table border="0" cellspacing="0" cellpadding="0" width="450" class="descriptiontable"><tr><td width="50%" valign="top"><span class="displayb">Model Procesor:</span> Intel Celeron<br><span class="displayb">Frecventa procesor (MHz):</span> 2660<br><span class="displayb">Placa Video:</span> Intel Extreme Graphics 2<br><span class="displayb">Retea integrata:</span> 10/100Mbps, RJ-45<br><span class="displayb">Chipset:</span> Intel 845G<br></td><td width="50%" valign="top"><span class="displayb">Capacitate RAM (MB):</span> 512<br><span class="displayb">Tip RAM:</span> DDR<br></td></tr></table>\n s.

    Read the article

  • Set background based on SPAN contents

    - by danit
    I need to set a different background image dependant on the contents of a SPAN: <div class="replies"> <span>2</span> </div> If SPAN = 1 background-image: url('reply.png') no-repeat; If SPAN = 'anything other than 1' background-image: url('replies.png') no-repeat; Can this be done in jQuery?

    Read the article

  • Outlook Signature Broken in Entourage

    - by Eric J.
    Some of our company uses Windows with Outlook 2010, and the rest use Mac with Entourage. When our standard signature line is included in an email that goes to Entourage, the result does not display correctly. It appears that Entourage is mangling the HTML. My working theory is that Entourage encounters inline CSS styles it does not know about and stops processing styles, but I'm really not sure. Question: How can I enter a signature into Outlook 2010 that will render correctly in Entourage? For example, can I specify somehow the exact HTML to use? Here's an example of how the HTML is being changed. Original on Outlook, as received by another Outlook client: <span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif"; color:#1785C5'>My Company<br> </span></b><span class=apple-style-span><span style='font-size:9.0pt; font-family:"Century Gothic","sans-serif";color:#666666'>123 Main St.</span></span><span class=apple-style-span><span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif"; color:#AFAFAF'>&nbsp;</span></span><span class=apple-style-span><span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif";color:#666666'>Suite 100</span></span> Note the use of spans, color #1785C5 and color #666666. Same original email, as displayed in an Entourage client: <span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif"; mso-fareast-font-family:"Times New Roman"'><br> <span style='color:#656565'>My Company<br> 123 Main St Suite 100<br> </span> Note the use of br tags rather than spans, and the color #656565.

    Read the article

  • ASP.NET DataList - defining "columns/rows" when repeating horizontal and using flow layout

    - by Ian Robinson
    Here is my DataList: <asp:DataList id="DataList" Visible="false" RepeatDirection="Horizontal" Width="100%" HorizontalAlign="Justify" RepeatLayout="Flow" runat="server"> [Contents Removed] </asp:DataList> This generates markup that has each item wrapped in a span. From there, I'd like to break each of these spans out into rows of three columns. Ideally I would like something like this: <div> <span>Item 1</span> <span>Item 2</span> <span>Item 3</span> </div> <div> <span>Item 4</span> <span>Item 5</span> <span>Item 6</span> </div> [etc] The closest I can get to this is to set RepeatColumns to "3" and then a <br> is inserted after every three items in the DataList. <span>Item 1</span> <span>Item 2</span> <span>Item 3</span> <br> <span>Item 4</span> <span>Item 5</span> <span>Item 6</span> <br> This gets me kind of close, but really doesn't do the trick - I still can't control the layout the way I'd like to be able to. Can anyone suggest a way to make this better? If I could implement the above example - that would be perfect, however I'd accept a less elegant solution as well - as long as its more flexible than <br> (such as inserting a <span class="clear"></span> instead of <br>).

    Read the article

  • Get the position of a div/span tag

    - by schmoopy
    Can someone show me how to get the .top & .left position of a div or span tag when one is not specified? ie: <span id='11a' style='top:55px;' onmouseover="GetPos(this);">stuff</span> <span id='12a' onmouseover="GetPos(this);">stuff</span> In the above, if i do: document.getElementById('11a').style.top The the value of 55px is returned. However if i try that for span '12a', then nothing gets returned. I have a bunch of div/spans on a page that i cannot specify the top/left properties for, but i need to display a div directly under that element. Thanks for lookin :-)

    Read the article

  • Add span tage to ActionLink title

    - by Simon Holman
    I need to add a span tag to the title of an actionlink to output the following html <li><a href="#" id="topmenu1" accesskey="1" title=""><span>Homepage</span></a></li> I currently have <li><%= Html.ActionLink("Homepage", "Index", "Home", null, new { @id= "topmenu1" , @accesskey = "1", @title = "" } ) %></li> which gives me <li><a accesskey="1" href="/" id="topmenu1" title="">Homepage</a></li> without the span tag around Homepage I cannot use <span>Homepage</span> as the title variable of the actionlink, that doesn't work.

    Read the article

  • Split number and put each digit to separate html element

    - by Seven
    The problem is that I do not know how to break the loop for the first number and start again for the next one. Currently, one span.nNumber has a total digits of the two numbers (123456) and the next span.nNumber contains digits only from another number (456). Goal is to create sequence 123 and 456: <span class='nNumber'> <span>1</span> <span>2</span> <span>3</span> </span> and <span class='nNumber'> <span>4</span> <span>5</span> <span>6</span> </span> Example script: http://jsfiddle.net/PZ8Pt/2/

    Read the article

  • How to make disabled or enabled on check box selection using jquery

    - by kumar
    Hello Friends, I am using this code to make enabling or disabling based on checkbox selection $('#Pchk').change(function() { var che =$('input[name=PMchk]').is(':checked'); if(!che) { $('fieldset').find("input,select,textarea").removeAttr('disabled'); } else { $('fieldset').find("input:not(:checkbox),select,textarea").attr('disabled', 'disabled'); $('#genericfieldset').find("input,select,textarea").removeAttr('disabled'); } }); Here is my Fieldset <fieldset calss="pricingM" id="PricingEditExceptions"> <div class="fiveper"> <label>FM#: <span><%=(null != a) ? Model.Asset.FundmasterSec : null%></span></label> <label>TNT#:<span><%=(null != a) ? Model.Asset.TNTSecurity: null%></span></label> <label>CUSIP#: <span><%=(null != a) ? Model.Asset.CUSIP :null%></span></label> <label>Asset:<span><%=(null != a) ? Model.Asset.AssetClassCode: null%></span></label> <label>Issue:<span><%=(null != a) ? Model.Asset.IssueType: null%></span></label> <label>COQ:<span><%=(null != a) ? Model.Asset.CodeCountryofQuotationName: null%></span></label> <label>CCY:<span><%=(null != a) ? Model.Asset.CurrencyCode: null%></span></label> <label>&nbsp;</label> </div> <div class="fiveper" id="display"> <input id="Pchk" type="checkbox" name="PMchk" value="<%=Model.ExceptionID%>" /> <label>ID#: <span><%=(null != a) ? Model.ExceptionID : 0%></span></label> <label for="ExceptionStatus"> Status: <span id="gui-stat-<%=Model.ExceptionID %>"> <%=Model.LookupCodes["C_EXCPT_STAT"].FirstOrDefault(model => model.Key.Trim().Equals(Model.ExceptionStatus.Trim())).Value%></span> </label> <label for="ResolutionCode"> Resolution: <span> <%=Html.DropDownListFor(model => model.ResolutionCode, new SelectList(Model.LookupCodes["C_EXCPT_RESL"], "Key", "Value", (null != Model.ResolutionCode) ? Model.ResolutionCode.Trim() : Model.ResolutionCode))%> </span> </label> <label for="ReasonCode"> Reason: <span><%=Html.DropDownListFor(model => model.ReasonCode, new SelectList(Model.LookupCodes["C_EXCPT_RSN"], "Key", "Value", (null != Model.ReasonCode) ? Model.ReasonCode.Trim() : Model.ReasonCode))%></span> </label> <label>Action Taken:<span><%=Html.DropDownListFor(model => model.ActionCode, new SelectList(Model.LookupCodes["C_EXCPT_ACT"], "Key", "Value", (null != Model.ActionCode) ? Model.ActionCode.Trim() : Model.ActionCode))%></span></label> <label>&nbsp;</label> </div> <div class="fiveper"> <label>Follow-Up:<span class="datepicker-container"><input type="text" id="exc-flwup-<%=Model.ExceptionID %>" name="exc-flwup-<%=Model.ExceptionID %>" value="<%=Model.FollowupDate %>" /></span></label> <label>Inqurity #: <span><%=Html.EditorFor(model => model.IOL)%></span> </label> <label>&nbsp;</label> <label>Comment: <span> <%=Html.TextAreaFor(model => model.Comment, new { })%> <%=Html.ValidationMessageFor(model => model.Comment)%> </span> </label> </div> <div id="hide" style="display:none"> <label><span><%=Model.Sequence %></span></label> <label><span><%=Model.AssignedId %></span></label> <span id="gui-stat-<%=Model.ExceptionID%>"> <%=Model.LookupCodes["C_EXCPT_STAT"].FirstOrDefault(model => model.Key.Trim().Equals(Model.ExceptionStatus.Trim())).Value%></span> <span>Last Updated:</span> <%=Model.LastUpdateUser.StartsWith("ATPB") ? "SYSTEM" : Model.LastUpdateUser%><br /> <%=Model.LastUpdated%> <% if (DateTime.Now.Date == Model.LastUpdated.Value .Date ) {%> <%=Math.Round((DateTime.Now - (DateTime)Model.LastUpdated).TotalHours, 0)%> hr<%} %> <p> <%=Html.EditorFor(model => model.SequenceDateTimeAsString)%> <%=Html.EditorFor(model => model.AssignedId)%> <span><%=Html.EditorFor(model => model.Origination)%></span> </p> </div> </fieldset> If I selct Four Users this Fieldset result will come in Four boxes....each box having Checkbox..Initially when the page loads I am disabling $('fieldset').find("input:not(:checkbox),select,textarea").attr('disabled','disabled'); ok with my Checkbox Change Funtion I am trying to make Enable or disable my Fieldset.. H here I need to handle Individual Fieldset based on Chekcbox.. right now If I select one check box all Fieldset inpu,select,texarea are making Disabled or Enable.. can anyone tell me how to handle Individual Fieldset on the same page/ thanks

    Read the article

  • Extending my desktop across two monitors with Nvidia Geforce 8800 GT

    - by Vega Sera
    When I played my old computer before I got this one, I was able to use the horizontal span. (Nvidia Geforce 6200 I believe) However, with this new computer, using vista and the 8800, the horizontal span option is gone, and all I have is dual veiw, which doesn't suit my needs. I play World of Warcraft on both my monitors, using CT_Viewport to keep my character and my veiwport on a single screen, while the majority of my addons lie on my other monitor. The problem with dual view is that the WoW will only stay on my primary monitor. Horizontal span would fix this easily, but there is no option for it. Any help regarding this?

    Read the article

  • unix command to verify span of word in text

    - by Ocasta Eshu
    What unix command(s) can I use to determine the line span that a word appears in text? The "span" being equal to the line number of the last instance of a word minus the line number of the first instance of the word. 1| unix is on two lines 2| once above, and once below 3| unix In the example above the "span" of 'unix' would be 2 (3-1). So far I've been trying to make use of grep -n but I don't think that grep is powerful enough. Maybe some use of sed or awk? Thanks!

    Read the article

  • javascript - dom - how to get info from a specific field?

    - by Fernando SBS
    <table id="movements" cellpadding="1" cellspacing="1"><thead><tr><th colspan="3">Movimentações de tropas:</th></tr></thead><tbody><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="att1" alt="Tropas atacantes chegando" title="Tropas atacantes chegando" /></a><span class="a1">&raquo;</span></td> <td><div class="mov"><span class="a1">1&nbsp;Ataque</span></div><div class="dur_r">em&nbsp;<span id="timer1">13:21:06</span>&nbsp;hrs.</div></div></td></tr><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="def1" alt="Tropas de reforço chegando" title="Tropas de reforço chegando" /></a><span class="d1">&raquo;</span></td> <td><div class="mov"><span class="d1">1&nbsp;Reforço</span></div><div class="dur_r">em&nbsp;<span id="timer2">0:14:55</span>&nbsp;hrs.</div></div></td></tr><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="att2" alt="Próprias tropas atacando" title="Próprias tropas atacando" /></a><span class="a2">&laquo;</span></td> <td><div class="mov"><span class="a2">1&nbsp;Ataque</span></div><div class="dur_r">em&nbsp;<span id="timer3">0:08:50</span>&nbsp;hrs.</div></div></td></tr><tr> <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="def2" alt="Próprias tropas reforçando" title="Próprias tropas reforçando" /></a><span class="d2">&laquo;</span></td> <td><div class="mov"><span class="d2">1&nbsp;Reforço</span></div><div class="dur_r">em&nbsp;<span id="timer4">2:50:45</span>&nbsp;hrs.</div></div></td></tr></tbody></table> this is the source code, what I need to is get the 0:14:55 . but it has to be based on the class="d1" because the id="timer2" is always changing, sometimes the 0:14:55 will be related to id="timer1", other times to id="timer3", but the class="d1" is always correct. How to do it? <td class="typ"><a href="build.php?gid=16"><img src="img/x.gif" class="def1" alt="Tropas de reforço chegando" title="Tropas de reforço chegando" /></a><span class="d1">&raquo;</span></td> <td><div class="mov"><span class="d1">1&nbsp;Reforço</span></div><div class="dur_r">em&nbsp;<span id="timer2">0:14:55</span>&nbsp;hrs.</div></div></td></tr><tr>

    Read the article

  • Dynamically changing background color of specific text without changing other attributes

    - by gsingh2011
    I've written a chrome extension to find text on a page based on a regex query. When text is matched, I wrap the matched text in a <span> tag that has the class highlight where highlight only changes the background color to yellow. The issue is that sometimes there are already styles applied to <span> tags in a webpage. For example, the webpage might have this defined: span { font-size: 200%; } So when I insert my <span> tag in another <span> tag, the font-size is actually 400%. Is there an easy way for my code to just change certain properties of the text, like the background color, without applying the webpage's styles twice?

    Read the article

  • Why my jquery is not working for a span tag

    - by Shantanu Gupta
    I am trying to display some message in span. but it is not working. <script type="text/javascript"> $(document).ready(function(){ /****************************First Name validation******************************/ $("#txtFirstName").bind("focusout",function(){ if($(this).val()=="" || $(this).val()=="First Name") { $(this).siblings("span[id*='error']").text("First Name Required"); $(this).val("First Name"); } }); $("#txtFirstName").bind("focusin",function(){ if($(this).val()=="First Name") { $(this).siblings("span[id*='error']").show("slow").text(""); $(this).val(""); } }); /********************End First Name validation*****************************/ }); Here is my html code for above code <td><input id="txtFirstName" type="text" value="First Name" runat="server"/><span class="error"></span></td>

    Read the article

  • <a> with an inner <span> not triggering :active state in IE 8

    - by Adam Singer
    I want to style the :active state of a button that is represented by an <a> tag. The <a> tag has an inner <span> (beacuse I want to add an icon to this button). I notice the :active state is triggered properly in everything but Internet Explorer 8. In IE 8, it appears that the area around the <span> (the <a>’s padding) triggers the :active state, but when clicking directly on the text within the <span>, the :active state is not triggered. Is there a way to fix this without resorting to Javascript? HTML <a class="button" href="#"> <span>Add a link</span> </a> CSS a.button { some styles } a.button:active { some other styles }

    Read the article

  • Matching two sections same number of times

    - by Leszczu
    Hello, i need a HTML to parse: <span>some text<span><span><span>text</span></span></span></span> I need to remove unnecessary <span> occurrences, so that output is: <span>some text<span>text</span></span> I wrote a regex, which does this once: /<SPAN>[^<]*<\/SPAN>/i How to make this work same number of times on both <span> and </span>?

    Read the article

  • How to populate the span tags for all text nodes between specific self closing tags.

    - by Rachel
    I want to populate span tags for all text nodes between the self closing tags s1 and s2 having the same id. Eg. For the input: <a> <b>Some <s1 id="1" />text here</b> <c>Some <s2 id="1"/>more text <s1 id="2"/> here<c/> <d>More data</d> <e>Some <s2 id="2" />more data</e> </a> In the above input i want to enclose every text node between <s1 id="1"/> and <s2 id="1" /> with span tags. Also all the text node between <s1 id="2" /> and <s2 id="2" /> Expected Output: <a> <b>Some <span class="spanClass" id="1a">text here</span></b> <c><span class="spanClass" id="1b">Some </span>more text <span class="spanClass" id="2a"> here</span></c> <d><span class="spanClass" id="2b">More data</span></d> <e><span class="spanClass" id="2c">Some </span>more data</e> </a> I am not concened about the pattern of the id tag populated for the span as along it is unique. If the transformation of the input to the output form requires the list of ids of the s1 , s2 tag pairs say 1, 2 etc i can assume that it in place in any form if required. Hope i am clear. How can this be achieved using XSL? EDIT: The input can have any structure and not exactly the same as seen in the sample input. It can have any number of s1, s2 tag pairs but each pair will have a unique id.Adding another sample input and output pattern for more information. Input: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <s1 id="1" />is my <s2 id="1" />heading</h1> <p> Sample content <s1 id="2" />Some text here. Some content here. </p> <p> Here you <s2 id="2" />go. </p> </body> </html> Desired output: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>This is my title</title> </head> <body> <h1 align="center">This <span id="1">is my </span>heading</h1> <p> Sample content <span id="2">Some text here. Some content here.</span> </p> <p> <span id="2">Here you </span>go. </p> </body> </html>

    Read the article

  • Log in/out of Gmail chat programmatically, clicking Gmail's span "links"

    - by endolith
    At work, I use Gmail's chat, since it's encrypted and logs chats without installing or saving anything to the hard drive. At home, I use Pidgin. When I log into GMail at home, I have to log out of chat, or messages will end up in the wrong place. When I log into GMail at work, I have to log back in to chat. In other words, when I start Firefox at home, I want Gmail's chat disabled automatically. When I start Firefox at work, I want Gmail's chat enabled automatically. Is there a way to use a Greasemonkey script or similar to force logging in and logging out on specific machines? It would seem simple enough; just follow a URL or simulate clicking a link. Unfortunately, Gmail doesn't use actual links. While logged out: <span tabindex="0" role="link" action="si" class="az9OKd">Sign into chat</span> While logged in, in drop-down menu: <div tabindex="-1" id=":1mj" role="menuitem" class="oA" value="si"><div class="uQ c6"/>Sign into chat</div> <div tabindex="-1" id=":8f" role="menuitem" class="oA" value="sia"><div class="uQ c5"/>Sign into AIM®</div> <div tabindex="-1" id=":8e" role="menuitem" class="oA" value="so"><div class="uQ df"/>Sign out of chat</div> At bottom of page: <span id=":im" class="l8 ou" tabindex="0" role="link">turn off chat</span> <span id=":im" class="l8 ou" tabindex="0" role="link">turn on chat</span> Anyone know how to "click" these non-links with JavaScript or access their functions? I would imagine that "so" means "sign out", "si" means "sign in", and "sia" means "sign in AIM". Can I somehow call these actions directly? Is there some other alternative for disabling chat?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >